2016-09-12 01:00:36 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
# maintainer: siddharthist
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.services.urxvtd;
|
|
|
|
in {
|
|
|
|
|
|
|
|
options.services.urxvtd.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Enable urxvtd, the urxvt terminal daemon. To use urxvtd, run
|
|
|
|
"urxvtc".
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
systemd.user = {
|
|
|
|
sockets.urxvtd = {
|
|
|
|
description = "socket for urxvtd, the urxvt terminal daemon";
|
2017-05-25 17:33:13 +00:00
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
partOf = [ "graphical-session.target" ];
|
2016-09-12 01:00:36 +00:00
|
|
|
socketConfig = {
|
|
|
|
ListenStream = "%t/urxvtd-socket";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.urxvtd = {
|
|
|
|
description = "urxvt terminal daemon";
|
2016-12-16 19:40:17 +00:00
|
|
|
path = [ pkgs.xsel ];
|
2016-09-12 01:00:36 +00:00
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtd -o";
|
|
|
|
Environment = "RXVT_SOCKET=%t/urxvtd-socket";
|
|
|
|
Restart = "on-failure";
|
|
|
|
RestartSec = "5s";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.rxvt_unicode-with-plugins ];
|
|
|
|
environment.variables.RXVT_SOCKET = "/run/user/$(id -u)/urxvtd-socket";
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|