diff options
author | lassulus <lass@aidsballs.de> | 2016-07-23 19:21:23 +0200 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2016-07-23 19:21:23 +0200 |
commit | f978c5312e1f88dd936495ff0fcd3a3aa032d90f (patch) | |
tree | 56e10a2cf4ced3d18d4ee8bfd4ba066e42a079d2 /tv/2configs/xdg.nix | |
parent | 29ef105c46287bb9964269004a56c51d4a2834bd (diff) | |
parent | c546bc8c2dc1ec0fa120c79df3de4d977ce322ed (diff) |
Merge remote-tracking branch 'cd/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} -"); +} |