-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Description
Description
I was thinking if it is possible to select configurations when booting.
With configurations I mean multiple files that look like configuration.nix but can be selected from the boot menu (grub or efi).
NixOS could really benefit from this feature, and offer something that no other distro has.
And I would use it extensively with my laptop (different places ask for different configurations).
Example
Here are a few example configurations that I had in mind.
These paths could be specified in the standard configuration.nix file.
| Path | Description |
|---|---|
| configurations/default.nix | Default configuration |
| configurations/work.nix | No games, different host-name and mac-address |
| configurations/headless.nix | Nixos without starting the x-server |
| configurations/free.nix | disable all nonfree software |
| configurations/nvidia.nix | disable bumblebee and directly use the graphics card |
Implementation
These configurations will import common configurations (or each-other) to prevent copy-pasting.
I don't have enough knowledge to know if this is actually possible.
But I think so, because we already do something like this with the multiple bootable 'generations'.