diff options
author | lassulus <lass@aidsballs.de> | 2015-04-07 20:47:56 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-05-19 23:15:56 +0200 |
commit | d65277c9a3df97be8af39fb370e1c560e61011e1 (patch) | |
tree | 628df501eeb12260136ecac6268f784b89e0607a | |
parent | d540df1d3875316dbd203d4b002eb2cc834a3b99 (diff) |
module urxvtd: add option xresources
-rw-r--r-- | modules/urxvtd.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/urxvtd.nix b/modules/urxvtd.nix index 3f3fee157..7eb471ed9 100644 --- a/modules/urxvtd.nix +++ b/modules/urxvtd.nix @@ -1,5 +1,10 @@ { config, lib, pkgs, ... }: +let + inherit (import ../lib { inherit pkgs; }) shell-escape; + inherit (pkgs) writeScript; +in + with builtins; with lib; @@ -21,6 +26,13 @@ with lib; default = pkgs.rxvt_unicode; description = "urxvt package to use"; }; + xresources = mkOption { + type = types.string; + default = ""; + description = '' + X server resources for urxvt. + ''; + }; }; }; @@ -33,12 +45,18 @@ with lib; description = "urxvt terminal daemon"; wantedBy = [ "multi-user.target" ]; restartIfChanged = false; + path = [ pkgs.xlibs.xrdb ]; environment = { + DISPLAY = ":0"; URXVT_PERL_LIB = "${urxvt}/lib/urxvt/perl"; }; serviceConfig = { Restart = "always"; User = user; + ExecStartPre = writeScript "urxvtd-prestart" '' + #!/bin/sh + echo ${shell-escape cfg.xresources} | xrdb -merge + ''; ExecStart = "${urxvt}/bin/urxvtd"; }; }; |