mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 14:41:17 +00:00
Merge pull request #19209 from siddharthist/urxvtd/init
urxvtd service: init
This commit is contained in:
commit
daf4e57577
|
@ -516,6 +516,7 @@
|
|||
./services/x11/hardware/synaptics.nix
|
||||
./services/x11/hardware/wacom.nix
|
||||
./services/x11/redshift.nix
|
||||
./services/x11/urxvtd.nix
|
||||
./services/x11/window-managers/awesome.nix
|
||||
#./services/x11/window-managers/compiz.nix
|
||||
./services/x11/window-managers/default.nix
|
||||
|
|
49
nixos/modules/services/x11/urxvtd.nix
Normal file
49
nixos/modules/services/x11/urxvtd.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
# maintainer: siddharthist
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.urxvtd;
|
||||
in {
|
||||
|
||||
options.services.urxvtd.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
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";
|
||||
after = [ "graphical.target" ];
|
||||
wants = [ "graphical.target" ];
|
||||
wantedBy = [ "sockets.target" ];
|
||||
socketConfig = {
|
||||
ListenStream = "%t/urxvtd-socket";
|
||||
};
|
||||
};
|
||||
|
||||
services.urxvtd = {
|
||||
description = "urxvt terminal daemon";
|
||||
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";
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in a new issue