Repository navigation
Description
Describe the bug
Sometimes users find themselves in an environment where the userActivationScripts haven't run yet.
Unless you're doing unusual early boot stuff, the system activationScripts have always already run. It's a simple and useful invariant. This is implemented by having them run both at startup and on nixos-rebuild switch.
The user userActivationScripts currently only run at nixos-rebuild switch, so users often find themselves in an environment where their userActivationScripts haven't run yet — the time between system start-up and the first nixos-rebuild switch run — which is typically at least hours and can be indefinite.
userActivationScripts should have the same invariant as the system activationScripts: unless you're doing unusual early startup stuff, they have always already run. The same implementation method makes sense: run them both at startup and on nixos-rebuild switch. The user-analogy to startup is login, so userActivationScripts should run at login.
To Reproduce
Steps to reproduce the behavior:
- Configure a userActivationScript.
- Restart the machine.
- Log in.
Expected behavior
The userActivationScript has run.
Additional context
Notify maintainers
@peterhoeg
Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
- system/activation/activation-script.nix
Activity
nixos/activation-script: Run userActivationScripts at login
stale commentedon Aug 15, 2021
I marked this as stale due to inactivity. → More info