Skip to content

Conversation

@jfroche
Copy link
Member

@jfroche jfroche commented Aug 20, 2025

refs #221

@jfroche jfroche force-pushed the activationScripts branch from f3b6f7f to bd1e5ce Compare August 20, 2025 23:43
@r-vdp
Copy link
Member

r-vdp commented Aug 21, 2025

Do we really want this? In nixpkgs we are moving away from activation scripts.
Can we not achieve the same with one-shot systemd services?

jfroche added a commit that referenced this pull request Aug 26, 2025
Eval works.

Work done until now:

- add missing `system.etc` and `systemd.sysusers` options.
- vendored nixpkgs/nixos/modules/config/users-groups.nix and comment `boot.initrd`
and `environment.profiles` configs.
- import user ids and userborn modules from nixpkgs.

Currently failing on:

vm-test> [2025-08-26T09:45:23Z INFO  system_manager::activate::etc_files] Done
vm-test> [2025-08-26T09:45:23Z INFO  system_manager::activate] Activating tmp files...
vm-test> /etc/tmpfiles.d/home-directories.conf:1: Failed to resolve user 'zimbatm': No such process

Most probably because we don't create the users/group before trying to create tmpfiles.

This PR is based on #258
because `user-groups.nix` and `userborn.nix` depend on
`system.activationScripts`.
@zimbatm
Copy link
Member

zimbatm commented Oct 23, 2025

What's good about the activation script is that it displays errors directly to the user switching the system. I can see how this is useful for critical components, or to add some sort of health check reporting.

@zimbatm zimbatm added this to the First release milestone Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants