Merge pull request 'base: add option config.virtualisation.vmVariant' (!101) from vm into main

Reviewed-on: https://git.pvv.ntnu.no/Drift/pvv-nixos-config/pulls/101
Reviewed-by: Oystein Kristoffer Tveit <oysteikt@pvv.ntnu.no>
This commit is contained in:
Peder Bergebakken Sundt 2025-05-31 19:01:47 +02:00
commit 1caa0cc7be
2 changed files with 16 additions and 1 deletions

View File

@ -7,6 +7,7 @@
./networking.nix
./nix.nix
./vm.nix
./services/acme.nix
./services/uptimed.nix
@ -77,4 +78,3 @@
# Trusted users on the nix builder machines
users.groups."nix-builder-users".name = "nix-builder-users";
}

15
base/vm.nix Normal file
View File

@ -0,0 +1,15 @@
{ lib, ... }:
# This enables
# lib.mkIf (!config.virtualisation.isVmVariant) { ... }
{
options.virtualisation.isVmVariant = lib.mkOption {
description = "`true` if system is build with 'nixos-rebuild build-vm'";
type = lib.types.bool;
default = false;
};
config.virtualisation.vmVariant = {
virtualisation.isVmVariant = true;
};
}