[Nix-dev] nested child configurations - was: multiple fullsystemprofiles

Michael Raskin 7c6f434c at mail.ru
Fri Feb 10 05:30:39 CET 2012


>Excerpts from Mathijs Kwik's message of Thu Feb 09 08:47:39 +0100 2012:
>> Nope, that would switch to the main profile (the lean one), dropping
>> out of x11 and such, when I'm currently in the "desktop" child.
>> So I do need to just nixos-rebuild boot, then switch to new profile's
>> child manually.
>No, X should not be stopped/restarted. See implementation.
>
>See this code:
>
>        # Hack: skip the shutdown and control-alt-delete jobs.
>        # Another hack: don't restart the X server (that would kill all the clients).
>        # And don't restart dbus, since that causes ConsoleKit to
>        # forget about current sessions.
>        # Idem for the emergeny-shell, because its `console owner'
>        # line screws up the X server.
>        # Idem for xendomains because we don't want to save/restore
>	# Xen domains unless we have to.
>        # TODO: Jobs should be able to declare that they should not be
>	# auto-restarted.
>        if echo "$job" | grep -q "^shutdown$\|^control-alt-delete$\|^xserver$\|^dbus$\|^disnix$\|^emergency-shell$\|^xendomains$"; then continue; fi
>
>  It would be too annoying.

X gets stopped when switching from an X-having configuration to no-X 
one. We talk about the case where main configuration has no X and only 
one some configurations have desktop packages.

>IMHO we should replace the list by an attrset
>
>nesting.clone = {
>  with_X = ...
>  network_at_home = ...
>  netowrk_at_work = ...
>}
>
>Then we could introduce a way to run the configurations by name.

Child configurations do have names, by the way. 

$ cat /var/run/current-system/fine-tune/child-1/configuration-name
Linux 2.6.29 (stable kernel)







More information about the nix-dev mailing list