summaryrefslogtreecommitdiffstats
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
authorEdmund Wu <fangkazuto@gmail.com>2019-08-13 22:39:26 -0400
committerEdmund Wu <fangkazuto@gmail.com>2019-12-10 11:29:30 -0500
commit5d21e8c92b1afc3f6521d5190ea7b8ed748f805a (patch)
treeed3c33667943d8259ab0ee6813d78d7b58f78447 /nixos/modules/hardware
parent38c7aa05eff8cb0be5aee75532f35db60aa98584 (diff)
nixos/nvidia: remove lib references
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r--nixos/modules/hardware/video/nvidia.nix24
1 files changed, 12 insertions, 12 deletions
diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix
index fcb30187fa2f..b365ff62d509 100644
--- a/nixos/modules/hardware/video/nvidia.nix
+++ b/nixos/modules/hardware/video/nvidia.nix
@@ -39,8 +39,8 @@ in
{
options = {
- hardware.nvidia.modesetting.enable = lib.mkOption {
- type = lib.types.bool;
+ hardware.nvidia.modesetting.enable = mkOption {
+ type = types.bool;
default = false;
description = ''
Enable kernel modesetting when using the NVIDIA proprietary driver.
@@ -52,8 +52,8 @@ in
'';
};
- hardware.nvidia.optimus_prime.enable = lib.mkOption {
- type = lib.types.bool;
+ hardware.nvidia.optimus_prime.enable = mkOption {
+ type = types.bool;
default = false;
description = ''
Enable NVIDIA Optimus support using the NVIDIA proprietary driver via PRIME.
@@ -79,16 +79,16 @@ in
'';
};
- hardware.nvidia.optimus_prime.allowExternalGpu = lib.mkOption {
- type = lib.types.bool;
+ hardware.nvidia.optimus_prime.allowExternalGpu = mkOption {
+ type = types.bool;
default = false;
description = ''
Configure X to allow external NVIDIA GPUs when using optimus.
'';
};
- hardware.nvidia.optimus_prime.nvidiaBusId = lib.mkOption {
- type = lib.types.str;
+ hardware.nvidia.optimus_prime.nvidiaBusId = mkOption {
+ type = types.str;
default = "";
example = "PCI:1:0:0";
description = ''
@@ -97,8 +97,8 @@ in
'';
};
- hardware.nvidia.optimus_prime.intelBusId = lib.mkOption {
- type = lib.types.str;
+ hardware.nvidia.optimus_prime.intelBusId = mkOption {
+ type = types.str;
default = "";
example = "PCI:0:2:0";
description = ''
@@ -179,7 +179,7 @@ in
hardware.opengl.package32 = nvidia_libs32;
environment.systemPackages = [ nvidia_x11.bin nvidia_x11.settings ]
- ++ lib.filter (p: p != null) [ nvidia_x11.persistenced ];
+ ++ filter (p: p != null) [ nvidia_x11.persistenced ];
systemd.tmpfiles.rules = optional config.virtualisation.docker.enableNvidia
"L+ /run/nvidia-docker/bin - - - - ${nvidia_x11.bin}/origBin"
@@ -190,7 +190,7 @@ in
# nvidia-uvm is required by CUDA applications.
boot.kernelModules = [ "nvidia-uvm" ] ++
- lib.optionals config.services.xserver.enable [ "nvidia" "nvidia_modeset" "nvidia_drm" ];
+ optionals config.services.xserver.enable [ "nvidia" "nvidia_modeset" "nvidia_drm" ];
# If requested enable modesetting via kernel parameter.
boot.kernelParams = optional cfg.modesetting.enable "nvidia-drm.modeset=1";