summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2015-11-10 12:44:05 +0100
committertv <tv@krebsco.de>2015-11-10 12:44:05 +0100
commit7ce26169db88cf68ab802a68ed55a3ed7b9be33a (patch)
treea90ec13e7e6c66c0151c76db53b34f6f5833673d
parent7cf1b1e4b7e5fe6980309b4037a75d154bb38598 (diff)
tv: setup XDG_RUNTIME_DIR for users
-rw-r--r--tv/2configs/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix
index 6ed1c65f9..749d249af 100644
--- a/tv/2configs/default.nix
+++ b/tv/2configs/default.nix
@@ -167,5 +167,13 @@ with lib;
"sendmail" # for sudo
];
}
+ {
+ systemd.tmpfiles.rules = let
+ forUsers = flip map users;
+ isUser = { group, ... }: hasSuffix "users" group;
+ users = filter isUser (mapAttrsToList (_: id) config.users.users);
+ in forUsers (u: "d /run/xdg/${u.name} 0700 ${u.name} ${u.group} -");
+ environment.variables.XDG_RUNTIME_DIR = "/run/xdg/$LOGNAME";
+ }
];
}