diff options
author | lassulus <lassulus@lassul.us> | 2018-04-26 12:54:03 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-04-26 12:54:03 +0200 |
commit | e7b4301dda04e17ca5802cddd2c037617674b599 (patch) | |
tree | 1e76afe6aa0aa8a4ac08387f7926a8ea64165e58 /jeschli/2configs/xdg.nix | |
parent | b1ecac535ecccaad05fcdea394f527e5cf88af3a (diff) | |
parent | b5d1c2f5e6ab4a44f81366e1b9de0b366d8aa871 (diff) |
Merge remote-tracking branch 'prism/staging/jeschli'
Diffstat (limited to 'jeschli/2configs/xdg.nix')
-rw-r--r-- | jeschli/2configs/xdg.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/jeschli/2configs/xdg.nix b/jeschli/2configs/xdg.nix new file mode 100644 index 000000000..18bac9b38 --- /dev/null +++ b/jeschli/2configs/xdg.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: + +with import <stockholm/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} -"); +} |