summaryrefslogtreecommitdiffstats
path: root/modules/urxvtd.nix
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-04-08 01:07:01 +0200
committertv <tv@shackspace.de>2015-05-19 23:16:56 +0200
commitcd6374e641420ade3603f0fd23fe9afac5c443bc (patch)
tree14dd49072264f70f32d826fadc3489a7b101b62c /modules/urxvtd.nix
parent6e70d8fc47f0725a63dc92c1c43d2b1831c7c4ef (diff)
I Like To Move It
Diffstat (limited to 'modules/urxvtd.nix')
-rw-r--r--modules/urxvtd.nix68
1 files changed, 0 insertions, 68 deletions
diff --git a/modules/urxvtd.nix b/modules/urxvtd.nix
deleted file mode 100644
index 7eb471ed9..000000000
--- a/modules/urxvtd.nix
+++ /dev/null
@@ -1,68 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
- inherit (import ../lib { inherit pkgs; }) shell-escape;
- inherit (pkgs) writeScript;
-in
-
-with builtins;
-with lib;
-
-{
- options = {
- services.urxvtd = {
- enable = mkOption {
- type = types.bool;
- default = false;
- description = "Enable urxvtd per user";
- };
- users = mkOption {
- type = types.listOf types.string;
- default = [];
- description = "users to run urxvtd for";
- };
- urxvtPackage = mkOption {
- type = types.package;
- default = pkgs.rxvt_unicode;
- description = "urxvt package to use";
- };
- xresources = mkOption {
- type = types.string;
- default = "";
- description = ''
- X server resources for urxvt.
- '';
- };
- };
- };
-
- config =
- let
- cfg = config.services.urxvtd;
- users = cfg.users;
- urxvt = cfg.urxvtPackage;
- mkService = user: {
- description = "urxvt terminal daemon";
- wantedBy = [ "multi-user.target" ];
- restartIfChanged = false;
- path = [ pkgs.xlibs.xrdb ];
- environment = {
- DISPLAY = ":0";
- URXVT_PERL_LIB = "${urxvt}/lib/urxvt/perl";
- };
- serviceConfig = {
- Restart = "always";
- User = user;
- ExecStartPre = writeScript "urxvtd-prestart" ''
- #!/bin/sh
- echo ${shell-escape cfg.xresources} | xrdb -merge
- '';
- ExecStart = "${urxvt}/bin/urxvtd";
- };
- };
- in
- mkIf cfg.enable {
- environment.systemPackages = [ urxvt ];
- systemd.services = listToAttrs (map (u: { name = "${u}-urxvtd"; value = mkService u; }) users);
- };
-}