diff options
author | makefu <github@syntax-fehler.de> | 2016-07-27 10:58:39 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2016-07-27 10:58:39 +0200 |
commit | 041eeaa4c9924d571d6977112ed7f0ebf7d0791c (patch) | |
tree | bb58908e6113917096a476cadf98ee5065b0ca83 /tv/2configs/xdg.nix | |
parent | 88a220f78825c1bfc60f0e885e02eacc0b7cd6a9 (diff) | |
parent | b139155bee6006f21993f3b2b6bfd5adde6fff6f (diff) |
Merge remote-tracking branch 'prism/master'
Diffstat (limited to 'tv/2configs/xdg.nix')
-rw-r--r-- | tv/2configs/xdg.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tv/2configs/xdg.nix b/tv/2configs/xdg.nix new file mode 100644 index 000000000..f05ec5431 --- /dev/null +++ b/tv/2configs/xdg.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: + +with config.krebs.lib; + +{ + environment.variables.XDG_RUNTIME_DIR = "/run/xdg/$LOGNAME"; + + systemd.tmpfiles.rules = let + forUsers = flip map users; + isUser = { name, group, ... }: + name == "root" || hasSuffix "users" group; + users = filter isUser (mapAttrsToList (_: id) config.users.users); + in forUsers (u: "d /run/xdg/${u.name} 0700 ${u.name} ${u.group} -"); +} |