From 8588e84109cf6129efea4b714dd2357210a9d03c Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Tue, 18 Mar 2025 23:26:51 +0100 Subject: [PATCH] base: add option config.virtualisation.vmVariant --- base/default.nix | 2 +- base/vm.nix | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 base/vm.nix diff --git a/base/default.nix b/base/default.nix index 9dfa7c5..e7908df 100644 --- a/base/default.nix +++ b/base/default.nix @@ -7,6 +7,7 @@ ./networking.nix ./nix.nix + ./vm.nix ./services/acme.nix ./services/auto-upgrade.nix @@ -64,4 +65,3 @@ # Trusted users on the nix builder machines users.groups."nix-builder-users".name = "nix-builder-users"; } - diff --git a/base/vm.nix b/base/vm.nix new file mode 100644 index 0000000..0beccc1 --- /dev/null +++ b/base/vm.nix @@ -0,0 +1,14 @@ +{ lib, ... }: + +# This enables +# lib.mkIf (!config.virtualisation.isVmVariant) { ... } + +{ + options.virtualisation.isVmVariant = lib.mkOption { + type = lib.types.bool; + default = false; + }; + config.virtualisation.vmVariant = { + virtualisation.isVmVariant = true; + }; +}