One thing I’ve grown to really like about NixOS is that nixos-rebuild switch
and nixos-install
usually will not let me build an invalid configuration. Due to this, I have a high degree of confidence that when I boot a NixOS system, it will actually boot. The only exception that I’ve noticed so far is that it will let me build an invalid hardware configuration. For instance, it has allowed me to build hardware configurations that specify a file system that doesn’t exist as my root file system. I’d imagine that adding a test to nixos-rebuild switch
and nixos-install
to prevent them from building such a hardware configuration should be easy and if users, for some reason, want to build such a hardware configuration, an option to override this behaviour could be added. So, I’m just curious is there any interest in adding such a feature to nixos-rebuild switch
/nixos-install
? If there are other parts of the hardware configuration with respect to which nixos-rebuild switch
/nixos-install
seems unreasonably permissive, it seems reasonable to discuss changing them here too.
1 Like
BTW it seems like there’s development effort towards nixos-rebuild-ng
, you might look into that in terms of testing?
Thanks for sharing. That is interesting.