diff options
author | tv <tv@krebsco.de> | 2015-11-10 12:44:05 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2015-11-10 12:44:05 +0100 |
commit | 6faffa1823a11b1325c85c635cb4e658e9ea44e4 (patch) | |
tree | 40fa9fc46b64bbeef95416f06ef0c22a296196cf /tv/2configs | |
parent | 1ca4ed76e03a3a475e8020ad5f49038d81c1d4ef (diff) |
tv: setup XDG_RUNTIME_DIR for users
Diffstat (limited to 'tv/2configs')
-rw-r--r-- | tv/2configs/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 6ed1c65..749d249 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"; + } ]; } |