tmpfiles: also remove files that need to be removed during activation (#6980)

Make sure that tmpfiles entries that ask for files/directories to be removed, are also executed
This commit is contained in:
Ramses 2025-05-07 17:27:02 +02:00 committed by GitHub
parent 1d5fb9da10
commit f3384e688d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,7 +37,7 @@ in
# Please change the option systemd.user.tmpfiles.rules instead.
${lib.concatStringsSep "\n" cfg.rules}
'';
onChange = "${pkgs.systemd}/bin/systemd-tmpfiles --user --create";
onChange = "${pkgs.systemd}/bin/systemd-tmpfiles --user --remove --create";
};
"systemd/user/basic.target.wants/systemd-tmpfiles-setup.service".source =
"${pkgs.systemd}/example/systemd/user/systemd-tmpfiles-setup.service";