nixpkgs/nixos/tests/non-switchable-system.nix
nikstur b3c1d8c9ae nixos: add system.switch.enable flag
This flag allows the user to optionally exclude
switch-to-confguration.pl from toplevel.

This is interesting for appliance images where you don't want to re-build
the system. This flag is called `rebuildable` because the standard
interface to do this is `nixos-rebuild` which will not work anymore with
this change.
2023-10-26 17:47:35 +02:00

15 lines
276 B
Nix

{ lib, ... }:
{
name = "non-switchable-system";
meta.maintainers = with lib.maintainers; [ nikstur ];
nodes.machine = {
system.switch.enable = false;
};
testScript = ''
machine.succeed("test ! -e /run/current-system/bin/switch-to-configuration")
'';
}