From a56796280948d5556c2b82b8e4d6e37dab4684f2 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 11 Feb 2023 02:13:07 +0100 Subject: [PATCH] hosts/TITAN: add headless nvidia gpu support --- hosts/TITAN/extras/nvidia-ml.nix | 8 ++++++++ hosts/TITAN/system.nix | 1 + 2 files changed, 9 insertions(+) create mode 100644 hosts/TITAN/extras/nvidia-ml.nix diff --git a/hosts/TITAN/extras/nvidia-ml.nix b/hosts/TITAN/extras/nvidia-ml.nix new file mode 100644 index 0000000..07b4599 --- /dev/null +++ b/hosts/TITAN/extras/nvidia-ml.nix @@ -0,0 +1,8 @@ +{ lib, ... }: + +{ + services.xserver.videoDrivers = lib.mkOptionDefault [ "nvidia" ]; + hardware.nvidia = { + nvidiaPersistenced = true; + }; +} diff --git a/hosts/TITAN/system.nix b/hosts/TITAN/system.nix index d68b314..a958420 100644 --- a/hosts/TITAN/system.nix +++ b/hosts/TITAN/system.nix @@ -12,6 +12,7 @@ in ./extras/ddcci-backlight.nix ./extras/fbi-downloader.nix ./extras/ipfs-cluster.nix + ./extras/nvidia-ml.nix (import ../../users "desktop").users.max inputs.agenix.nixosModules.age ]