diff options
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/hardware/video/nvidia.nix | 9 | ||||
-rw-r--r-- | nixos/tests/discourse.nix | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 0b1238dd888..a40713ac25c 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -4,10 +4,9 @@ pkgs, ... }: let - x11Enabled = config.services.xserver.enable - && (lib.elem "nvidia" config.services.xserver.videoDrivers); + nvidiaEnabled = (lib.elem "nvidia" config.services.xserver.videoDrivers); nvidia_x11 = - if x11Enabled || cfg.datacenter.enable + if nvidiaEnabled || cfg.datacenter.enable then cfg.package else null; @@ -256,7 +255,7 @@ in { ({ assertions = [ { - assertion = !(x11Enabled && cfg.datacenter.enable); + assertion = !(nvidiaEnabled && cfg.datacenter.enable); message = "You cannot configure both X11 and Data Center drivers at the same time."; } ]; @@ -289,7 +288,7 @@ in { ]; }) # X11 - (lib.mkIf x11Enabled { + (lib.mkIf nvidiaEnabled { assertions = [ { assertion = primeEnabled -> pCfg.intelBusId == "" || pCfg.amdgpuBusId == ""; diff --git a/nixos/tests/discourse.nix b/nixos/tests/discourse.nix index c79ba41c2eb..3e69a314905 100644 --- a/nixos/tests/discourse.nix +++ b/nixos/tests/discourse.nix @@ -166,7 +166,7 @@ import ./make-test-python.nix ( request = builtins.toJSON { title = "Private message"; raw = "This is a test message."; - target_usernames = admin.username; + target_recipients = admin.username; archetype = "private_message"; }; in '' |