[Nix-dev] multiple full system profiles
Mathijs Kwik
mathijs at bluescreen303.nl
Wed Feb 8 20:28:34 CET 2012
Hi all,
In my home dir I'm successfully using myEnvFun for different projects,
using loadenv to jump into them and have a specialized environment for
that project.
I would like to have something like that for my full system config as well.
Not just the software "installed", but upstart tasks and configuration
as well, selectable at boot.
- For work, I need to run some services (like mysql with a somewhat
heavier config, samba, vpn, different firewall settings).
- For normal use, I don't need those, and like to change/experiment
with desktop environments more often.
- I would like to start some other minimal config as well, with a
different kernel, no heavy desktop env, beta gfx drivers.
Currently, I just have multiple configuration.nix files (sharing most
stuff through includes), which I can swap (change symlink) and
rebuild/boot into.
However, after updating nixos/nixpkgs, I want all these "profiles" to update.
I can probably script that (swap in each config file, nixos-rebuild
--fast boot , swap again, ..., restore current config last, rebuild
switch).
I found the boot.loader.grub.configurationName setting as well, which
makes picking one at boot easier.
It feels like quite a natural thing to do on top of nix. Is there
functionality I don't know about to achieve this?
Does anyone else do something similar?
Please let me know,
Mathijs
More information about the nix-dev
mailing list