summaryrefslogtreecommitdiffstats
path: root/modules/tv/urxvt.nix
blob: a975812486edefd36f8051fab82ec6d17913564f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ pkgs, ... }:

 with builtins;

let
  users = [ "tv" ];
  urxvt = pkgs.rxvt_unicode;
  mkService = user: {
    description = "urxvt terminal daemon";
    wantedBy = [ "multi-user.target" ];
    restartIfChanged = false;
    serviceConfig = {
      Restart = "always";
      User = user;
      ExecStart = "${urxvt}/bin/urxvtd";
    };
  };

in

{
  environment.systemPackages = [ urxvt ];
  systemd.services = listToAttrs (map (u: { name = "${u}-urxvtd"; value = mkService u; }) users);
}