Hello I am fairly new to NixOS and the nix language, I am in the process of using flakes for my configurations. I have a full install of NixOS on an external drive that I move between a laptop and desktop. I have particular settings required for each and thus I would like to be able to select which configuration I want at boot time. Before switching to flakes I was using specializations and those worked well for this purpose, I read some where that nixosConfigurations within flakes will appear in a similar manner within grub but this is not the behavior I have seen thus far.
Relevant snippet of flake.nix in etc/nixos:
nixosConfigurations = {
Desktop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./modules/nixos/desktop.nix
./nixos/configuration.nix
];
};
Laptop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
./modules/nixos/laptop.nix
./nixos/configuration.nix
];
};
};
Additionally if anyone has managed to automate the selection process through conditional checks please share, if said solution proves to be possible then that would be preferred.