this post was submitted on 21 Mar 2025
7 points (88.9% liked)
Nix / NixOS
2109 readers
1 users here now
Main links
Videos
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You can boot a live-usb, mount the remaining drive(s) and nixos-enter over like you would if you were installing NixOS for the first time.
This allows you to make changes and build a new generation using the network connection of the live-usb.
I didn't know NixOS has its own chroot.
I'm "chrooted" into the system, howver, user-mapping seems not to work currently. Logrotate fails to build because of a missing user ID.
EDIT: I commented out all the "advanced" features and had to add some flags.
services.logrotate.checkConfig = false;
in the config solved the "user or group not found" issue and addNIXOS_SWITCH_USE_DIRTY_ENV=1
to nixos-rebuild (https://nixos.wiki/wiki/Change_root).Now it seems to work and I could piece by piece reactive all the deactivated parts.