[Nix-dev] nested child configurations - was: multiple full systemprofiles

Michael Raskin 7c6f434c at mail.ru
Thu Feb 9 08:41:44 CET 2012


>> What you should consider is using /nix/var/nix/profiles/system-*-link
>> If I remember correctly, it is not affected by switches.
>Cool, indeed, that's a better entry point than /var/nix/current-system.
>I can now list and switch child profiles easily.

So it is not afected. Nice to know, thanks for checking.

>> While you are at that, I was always too lazy to add all children of
>> top-3 (top n with n being parameter?) configurations in GRUB menu. If
>> your use case would be helped by this idea, actually changing the script
>> should be easy.
>
>The current grub behavior is ok. I rarely boot into previous
>configurations, only if I screw something up.
>In that case, booting the default lean base profile is fine.
>So just the most recent child entries suffice.

Heh. For me, default is the most bloated option. But of course, I always
check that it can be booted before using any child of it.

>>>I can then just use helper scripts to list all available child-configs
>>>(from the top-level configuration) and switch to them.
>>>- Have "nixos-rebuild boot" print the path to the config it just built
>>>Then I can switch to the new config's child variant myself, performing
>>>a child-to-child jump.
>>
>> That can be done via
>>
>> nixos-rebuild pull && nix-build /etc/nixos/nixos -A system --no-out-link
>
>That works. That doesn't update grub yet, so I need to
>"switch-to-config boot" in the result directory, then switch-to-config
>switch on its child.
>So I guess that suffices for my goal.

You could do nixos-rebuild switch then nix-build





More information about the nix-dev mailing list