git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #19209 from siddharthist/urxvtd/init

urxvtd service: init

commitdaf4e57577d0e67c9f4e92d172d3cc83b8c6b82d authorJörg Thalheim <joerg@higgsboson.tk> dateFri 7 Oct 2016, 16:14 (10 years ago) parent7ca139c543494b
2 files changed+50
nixos/modules/module-list.nix+1 nixos/modules/services/x11/urxvtd.nix+49
nixos/modules/module-list.nix+1
@@ -516,6 +516,7 @@
516516 ./services/x11/hardware/synaptics.nix
517517 ./services/x11/hardware/wacom.nix
518518 ./services/x11/redshift.nix
519+ ./services/x11/urxvtd.nix
519520 ./services/x11/window-managers/awesome.nix
520521 #./services/x11/window-managers/compiz.nix
521522 ./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+}