2016-07-23 11:19:44 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2016-10-20 18:54:38 +00:00
|
|
|
with import <stockholm/lib>;
|
2016-07-23 11:19:44 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
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} -");
|
|
|
|
}
|