Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agenix is not compatible with userborn #13

Open
Mic92 opened this issue Dec 11, 2024 · 7 comments
Open

agenix is not compatible with userborn #13

Mic92 opened this issue Dec 11, 2024 · 7 comments

Comments

@Mic92
Copy link
Contributor

Mic92 commented Dec 11, 2024

Dec 05 00:42:37 build01 systemd[1]: Starting /nix/store/k88rz3p58mp584jd0v63wlxx3vja2fwg-nixos-system-build01-25.05.20241201.767b0e3/bin/switch-to-configuration switch...
Dec 05 00:42:37 build01 systemd[1]: Started /nix/store/k88rz3p58mp584jd0v63wlxx3vja2fwg-nixos-system-build01-25.05.20241201.767b0e3/bin/switch-to-configuration switch.
Dec 05 00:42:38 build01 nixos[4248]: switching to system configuration /nix/store/k88rz3p58mp584jd0v63wlxx3vja2fwg-nixos-system-build01-25.05.20241201.767b0e3
Dec 05 00:42:40 build01 nixos[4248]: switching to system configuration /nix/store/k88rz3p58mp584jd0v63wlxx3vja2fwg-nixos-system-build01-25.05.20241201.767b0e3 failed (status 2)
Dec 05 00:42:40 build01 systemd[1]: nixos-rebuild-switch-to-configuration.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 05 00:42:40 build01 systemd[1]: nixos-rebuild-switch-to-configuration.service: Failed with result 'exit-code'.
  • nixos-rebuild switch fails.
  • nixos-rebuild boot works but then running switch again (switching into the current booted generation) fails?

This was reported by @zowoq in nix-community/srvos#575

@nikstur
Copy link
Owner

nikstur commented Dec 11, 2024

I can't really do anything with this information. I don't see any failure. Whats the output of the userborn service?

@zowoq
Copy link

zowoq commented Dec 11, 2024

Dec 11 11:01:19 build01 systemd[1]: Starting Manage Users and Groups...
Dec 11 11:01:19 build01 umount[3095139]: umount: /etc/group: not mounted.
Dec 11 11:01:19 build01 umount[3095140]: umount: /etc/passwd: not mounted.
Dec 11 11:01:19 build01 umount[3095143]: umount: /etc/shadow: not mounted.
Dec 11 11:01:19 build01 systemd[1]: Finished Manage Users and Groups.
Dec 11 11:01:59 build01 systemd[1]: userborn.service: Deactivated successfully.
Dec 11 11:01:59 build01 systemd[1]: Stopped Manage Users and Groups.

@zowoq
Copy link

zowoq commented Dec 11, 2024

I don't understand why the error is just Main process exited, code=exited, status=2/INVALIDARGUMENT and not something a bit more informative but it is caused by the nixpkgs userborn module disabling system.activationScripts.users, which is needed by agenix.

The userborn module does check this:

assertion = config.system.activationScripts.users == "";

but it also does this:

system.activationScripts.users = lib.mkForce "";

so we don't see the assertion.

@nikstur
Copy link
Owner

nikstur commented Dec 11, 2024

Yeah so this basically boils down to agenix not being compatible with userborn

@Mic92
Copy link
Contributor Author

Mic92 commented Dec 11, 2024

@Mic92
Copy link
Contributor Author

Mic92 commented Dec 11, 2024

Solved by ryantm/agenix#255 but looks like upstream is a bit slow reviewing stuff.

@Mic92 Mic92 changed the title Userborn fails on the first nixos-rebuild switch Not compatible with agenix Dec 17, 2024
@Mic92 Mic92 changed the title Not compatible with agenix agenix is not compatible with userborn Dec 17, 2024
@Mic92
Copy link
Contributor Author

Mic92 commented Dec 17, 2024

Keep this open since other people might stumble over this.

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

No branches or pull requests

3 participants