summaryrefslogtreecommitdiffstats
path: root/tv/2configs/xdg.nix
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2016-07-23 19:21:23 +0200
committerlassulus <lass@aidsballs.de>2016-07-23 19:21:23 +0200
commitf978c5312e1f88dd936495ff0fcd3a3aa032d90f (patch)
tree56e10a2cf4ced3d18d4ee8bfd4ba066e42a079d2 /tv/2configs/xdg.nix
parent29ef105c46287bb9964269004a56c51d4a2834bd (diff)
parentc546bc8c2dc1ec0fa120c79df3de4d977ce322ed (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'tv/2configs/xdg.nix')
-rw-r--r--tv/2configs/xdg.nix14
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} -");
+}