From cbd9e5ea8ac1a1d4f1b088d2cda99df004016e8f Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 5 May 2015 17:16:57 +0200 Subject: xresources: implement by using session commands --- modules/lass/xresources.nix | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) (limited to 'modules/lass') diff --git a/modules/lass/xresources.nix b/modules/lass/xresources.nix index e99985b61..0392c6caf 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 + ''; }; -- cgit v1.2.3