mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 14:41:17 +00:00
nixos/activation-script: Run userActivationScripts at login
Fixes https://github.com/NixOS/nixpkgs/issues/113240
This commit is contained in:
parent
f6ddd253e0
commit
df25ca8520
|
@ -234,6 +234,7 @@ in
|
|||
script = config.system.userActivationScripts.script;
|
||||
unitConfig.ConditionUser = "!@system";
|
||||
serviceConfig.Type = "oneshot";
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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)
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue