diff options
author | nikstur <nikstur@outlook.com> | 2023-10-14 01:29:05 +0200 |
---|---|---|
committer | nikstur <nikstur@outlook.com> | 2023-10-26 17:47:35 +0200 |
commit | b3c1d8c9aea817c66e8a6384a345390ac36f40eb (patch) | |
tree | 3641d946d7ed946d3869d37135cc473e92793a3d /nixos/tests/non-switchable-system.nix | |
parent | f743f021fccbccac6dbf38d3f6700002d839a3d4 (diff) |
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.
Diffstat (limited to 'nixos/tests/non-switchable-system.nix')
-rw-r--r-- | nixos/tests/non-switchable-system.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nixos/tests/non-switchable-system.nix b/nixos/tests/non-switchable-system.nix new file mode 100644 index 0000000000000..54bede75453ba --- /dev/null +++ b/nixos/tests/non-switchable-system.nix @@ -0,0 +1,15 @@ +{ 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") + ''; +} |