1 import ./make-test-python.nix ({ lib, ... }: {
2 name = "systemd-user-tmpfiles-rules";
4 meta = with lib.maintainers; {
5 maintainers = [ schnusch ];
8 nodes.machine = { ... }: {
10 alice.isNormalUser = true;
11 bob.isNormalUser = true;
14 systemd.user.tmpfiles = {
16 "d %h/user_tmpfiles_created"
24 testScript = { ... }: ''
25 machine.succeed("loginctl enable-linger alice bob")
27 machine.wait_until_succeeds("systemctl --user --machine=alice@ is-active systemd-tmpfiles-setup.service")
28 machine.succeed("[ -d ~alice/user_tmpfiles_created ]")
29 machine.succeed("[ -d ~alice/only_alice ]")
31 machine.wait_until_succeeds("systemctl --user --machine=bob@ is-active systemd-tmpfiles-setup.service")
32 machine.succeed("[ -d ~bob/user_tmpfiles_created ]")
33 machine.succeed("[ ! -e ~bob/only_alice ]")