From 55c8a0273fc17ae1bf54b47564629fcbeb806d85 Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Tue, 26 Mar 2024 21:02:14 +0100 Subject: [PATCH] [systems] disable nvidia from phaedra --- nix/systems/phaedra/hardware-configuration.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nix/systems/phaedra/hardware-configuration.nix b/nix/systems/phaedra/hardware-configuration.nix index 1730553..5d2f1fa 100644 --- a/nix/systems/phaedra/hardware-configuration.nix +++ b/nix/systems/phaedra/hardware-configuration.nix @@ -33,4 +33,16 @@ # hardware hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + # disable nvidia! + systemd.services.removeNvidia = { + wantedBy = [ "multi-user.target" ]; + description = "Remove NVIDIA upon boot"; + serviceConfig = { + Type = "oneshot"; + User = "root"; + RemainAfterExit = true; + ExecStart = ''${pkgs.bash}/bin/bash -c "echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove"''; + }; + }; }