3
0
Fork 0
forked from mirrors/nixpkgs

nixos/activation-script: Run userActivationScripts at login

Fixes https://github.com/NixOS/nixpkgs/issues/113240
This commit is contained in:
Chuck 2021-02-15 15:09:30 -08:00
parent f6ddd253e0
commit df25ca8520
2 changed files with 3 additions and 2 deletions

View file

@ -234,6 +234,7 @@ in
script = config.system.userActivationScripts.script;
unitConfig.ConditionUser = "!@system";
serviceConfig.Type = "oneshot";
wantedBy = [ "default.target" ];
};
};
};

View file

@ -25,9 +25,9 @@ import ./make-test-python.nix ({ lib, ... }: {
machine.send_chars("pass1\n")
machine.send_chars("touch login-ok\n")
machine.wait_for_file("/home/alice/login-ok")
verify_user_activation_run_count(0) # Wrong! Should be 1
verify_user_activation_run_count(1)
machine.succeed("/run/current-system/bin/switch-to-configuration test")
verify_user_activation_run_count(1) # Wrong! Should be 2
verify_user_activation_run_count(2)
'';
})