diff options
author | lassulus <lass@aidsballs.de> | 2015-05-05 17:16:57 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2015-05-19 23:17:19 +0200 |
commit | 1819e04f460db23d2ce3a8993fa64e4d8c2f4f94 (patch) | |
tree | f0a5980eb0fda1372ec73eb75323237f065eab61 /modules/lass/xresources.nix | |
parent | 53936163f963feac96da2cb2aed8172b3a84a759 (diff) |
xresources: implement by using session commands
Diffstat (limited to 'modules/lass/xresources.nix')
-rw-r--r-- | modules/lass/xresources.nix | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/modules/lass/xresources.nix b/modules/lass/xresources.nix index e99985b..0392c6c 100644 --- a/modules/lass/xresources.nix +++ b/modules/lass/xresources.nix @@ -50,14 +50,6 @@ in ''; }; - services.xresources.user = mkOption { - type = types.str; - default = "nobody"; - description = '' - The user the xresources should be loaded as. - ''; - }; - services.xresources.resources = mkOption { default = {}; type = types.attrsOf types.str; @@ -79,29 +71,10 @@ in user = cfg.user; xres = concatStringsSep "\n" (attrValues cfg.resources); - mkService = user: xres: rec { - description = "xresources managment script"; - requires = [ "display-manager.service" ]; - after = requires; - path = [ pkgs.xlibs.xrdb ]; - - #TODO: make DISPLAY configurable - environment = { - DISPLAY = ":0"; - }; - serviceConfig = { - Type = "oneshot"; - User = user; - RemainAfterExit = "yes"; - ExecStart = writeScript "${user}-xresources-init" '' - #!/bin/sh - echo ${shell-escape xres} | xrdb -merge - ''; - }; - }; - in mkIf cfg.enable { - systemd.services."${user}-xresources" = mkService user xres; + services.xserver.displayManager.sessionCommands = '' + echo ${shell-escape xres} | xrdb -merge + ''; }; |