From 713019c2d9146d3611ab953c5f734f5cbbe44058 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Fri, 16 Aug 2024 11:52:49 +0000 Subject: [PATCH] nixos-mods/hwCommon: assert both hwCommon & vmCommon from being enabled instead of blocking it hard --- nix/nixos-modules/hwCommon.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nix/nixos-modules/hwCommon.nix b/nix/nixos-modules/hwCommon.nix index 7fe881f..5d0dd24 100644 --- a/nix/nixos-modules/hwCommon.nix +++ b/nix/nixos-modules/hwCommon.nix @@ -56,6 +56,14 @@ in config = lib.mkIf cfg.enable { + assertions = [ + { + assertion = cfg.enable -> !config.x-banananetwork.vmCommon.enable; + message = "hwCommon & vmCommon profiles cannot both be enabled at the same time"; + } + ]; + + boot = { # TODO adapt better @@ -132,7 +140,6 @@ in x-banananetwork = { allCommon.enable = true; - vmCommon.enable = false; useable.enable = lib.mkDefault true; # add docs & tools for emergencies };