git.iko.soy/typeable/nixpkgs
on master help sign in
urxvtd service: init

adds pkgs.rxvt_unicode-with-plugins adds appropriate environment.variables no default target, must be enabled manually

commit543494b815f7370c8ba61b69607514fdf5abca95 authorLangston Barrett <langston.barrett@gmail.com> dateMon 12 Sep 2016, 01:00 (10 years ago) parent66d622f
2 files changed+50
nixos/modules/module-list.nix+1 nixos/modules/services/x11/urxvtd.nix+49
nixos/modules/module-list.nix+1
@@ -515,6 +515,7 @@
515515 ./services/x11/hardware/synaptics.nix
516516 ./services/x11/hardware/wacom.nix
517517 ./services/x11/redshift.nix
518+ ./services/x11/urxvtd.nix
518519 ./services/x11/window-managers/awesome.nix
519520 #./services/x11/window-managers/compiz.nix
520521 ./services/x11/window-managers/default.nix
nixos/modules/services/x11/urxvtd.nixnew file+49
@@ -0,0 +1,49 @@
1+{ config, lib, pkgs, ... }:
2+
3+# maintainer: siddharthist
4+
5+with lib;
6+
7+let
8+ cfg = config.services.urxvtd;
9+in {
10+
11+ options.services.urxvtd.enable = mkOption {
12+ type = types.bool;
13+ default = false;
14+ example = true;
15+ description = ''
16+ Enable urxvtd, the urxvt terminal daemon. To use urxvtd, run
17+ "urxvtc".
18+ '';
19+ };
20+
21+ config = mkIf cfg.enable {
22+ systemd.user = {
23+ sockets.urxvtd = {
24+ description = "socket for urxvtd, the urxvt terminal daemon";
25+ after = [ "graphical.target" ];
26+ wants = [ "graphical.target" ];
27+ wantedBy = [ "sockets.target" ];
28+ socketConfig = {
29+ ListenStream = "%t/urxvtd-socket";
30+ };
31+ };
32+
33+ services.urxvtd = {
34+ description = "urxvt terminal daemon";
35+ serviceConfig = {
36+ ExecStart = "${pkgs.rxvt_unicode-with-plugins}/bin/urxvtd -o";
37+ Environment = "RXVT_SOCKET=%t/urxvtd-socket";
38+ Restart = "on-failure";
39+ RestartSec = "5s";
40+ };
41+ };
42+
43+ };
44+
45+ environment.systemPackages = [ pkgs.rxvt_unicode-with-plugins ];
46+ environment.variables.RXVT_SOCKET = "/run/user/$(id -u)/urxvtd-socket";
47+ };
48+
49+}