urxvt: Allow switching out package
This commit is contained in:
parent
fa17392fd8
commit
289fe57eea
@ -7,14 +7,24 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.urxvtd;
|
cfg = config.services.urxvtd;
|
||||||
in {
|
in {
|
||||||
|
options.services.urxvtd = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Enable urxvtd, the urxvt terminal daemon. To use urxvtd, run
|
||||||
|
"urxvtc".
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
options.services.urxvtd.enable = mkOption {
|
package = mkOption {
|
||||||
type = types.bool;
|
default = pkgs.rxvt_unicode-with-plugins;
|
||||||
default = false;
|
defaultText = "pkgs.rxvt_unicode-with-plugins";
|
||||||
description = ''
|
description = ''
|
||||||
Enable urxvtd, the urxvt terminal daemon. To use urxvtd, run
|
Package to install. Usually pkgs.rxvt_unicode-with-plugins or pkgs.rxvt_unicode
|
||||||
"urxvtc".
|
'';
|
||||||
'';
|
type = types.package;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
@ -24,14 +34,14 @@ in {
|
|||||||
partOf = [ "graphical-session.target" ];
|
partOf = [ "graphical-session.target" ];
|
||||||
path = [ pkgs.xsel ];
|
path = [ pkgs.xsel ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtd -o";
|
ExecStart = "${cfg.package}/bin/urxvtd -o";
|
||||||
Environment = "RXVT_SOCKET=%t/urxvtd-socket";
|
Environment = "RXVT_SOCKET=%t/urxvtd-socket";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = "5s";
|
RestartSec = "5s";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.rxvt_unicode-with-plugins ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
environment.variables.RXVT_SOCKET = "/run/user/$(id -u)/urxvtd-socket";
|
environment.variables.RXVT_SOCKET = "/run/user/$(id -u)/urxvtd-socket";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user