nixos/systemd-repart: enable creating root partition#232533
nixos/systemd-repart: enable creating root partition#232533ElvishJerricco merged 1 commit intoNixOS:masterfrom
Conversation
ElvishJerricco
left a comment
There was a problem hiding this comment.
My only concerns are the escapeSystemdPath thing and another thing I just realized. We definitely don't want it looking at the config files in /sysroot/etc/repart.d before activation because those could be out of date. So the after = ["sysroot.mount"]; should almost certainly be after = ["nixos-activation.service"]; That should also be added to requires.
Also, FYI, it's generally a little more convenient / appropriate to use systemd.services.foo.after rather than systemd.services.foo.unitConfig.After (same goes for requires). This makes it easier to add to with the nixos module system. Not a big deal though.
6950965 to
da205e6
Compare
Good to know, changed it accordingly.
This shouldn't be an issue in the initrd since the config files are now baked into the initrd and we tell However in userspace, this might be an issue. I added the ordering there. |
da205e6 to
ef80e11
Compare
|
@arianvp @ElvishJerricco is there anything else to be done? Or is this good to go? |
|
Thanks! |
Description of changes
Add the ability to create the root partition while in the initrd. This enables to build system image with only a Nix store where the root partition is dynamically created.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)