diff options
author | Jared Baur <jaredbaur@fastmail.com> | 2023-08-26 17:01:59 -0700 |
---|---|---|
committer | Jared Baur <jaredbaur@fastmail.com> | 2023-08-29 10:46:44 -0700 |
commit | e39c9f13bcf8fe680d3bedcc35a121aede1cc0d8 (patch) | |
tree | 151f41b680e84e50b640b7161b7e0c8849b94163 /nixos/modules/system/boot | |
parent | a7d27e87ee8a2b5b5a6bd39e5c3cdf7549606923 (diff) |
nixos/systemd-user: call systemd-tmpfiles during activation
Just like with system-wide tmpfiles, call `systemd-tmpfiles --create --remove` for users during activation. This fixes an issue where new entries in a user's tmpfiles are not reflected after activation, only at boot when the user service systemd-tmpfiles-setup.service runs or only after running systemd-tmpfiles manually.
Diffstat (limited to 'nixos/modules/system/boot')
-rw-r--r-- | nixos/modules/system/boot/systemd/user.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd/user.nix b/nixos/modules/system/boot/systemd/user.nix index 1b6398d2f929e..64dc19633eca9 100644 --- a/nixos/modules/system/boot/systemd/user.nix +++ b/nixos/modules/system/boot/systemd/user.nix @@ -230,5 +230,9 @@ in { }); }) cfg.tmpfiles.users; + + system.userActivationScripts.tmpfiles = '' + ${config.systemd.package}/bin/systemd-tmpfiles --user --create --remove + ''; }; } |