diff options
author | lassulus <lass@aidsballs.de> | 2015-04-07 20:47:56 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2015-05-19 23:15:56 +0200 |
commit | 47dbc30365f95fb5f3fe4ae963b013305b392518 (patch) | |
tree | 628df501eeb12260136ecac6268f784b89e0607a | |
parent | 7593f2b31d8d247723a4eb8f9c00fae3a4f6defc (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 3f3fee1..7eb471e 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"; }; }; |