From 038054d6af23945b81c97d81d562069a70c95257 Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Wed, 14 Aug 2024 12:56:28 +0200 Subject: [PATCH] nixos-mods: fix assertion for hardware.graphics.required --- nix/nixos-modules/graphics.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/nix/nixos-modules/graphics.nix b/nix/nixos-modules/graphics.nix index 1243e19..33dc7d9 100644 --- a/nix/nixos-modules/graphics.nix +++ b/nix/nixos-modules/graphics.nix @@ -26,13 +26,12 @@ in config = lib.mkMerge [ - ( - lib.mkIf - cfg.required - { - assertions = [ (cfg.amd.enable || cfg.intel.enable) ]; - } - ) + { + assertions = [{ + assertion = cfg.required -> cfg.amd.enable || cfg.intel.enable; + message = "'hardware.graphics.required' not fullfilled by any of 'hardware.graphics.*.enable'"; + }]; + } ( # TODO replace with drivers