From 030377427bb58f0708e0d9a349b17d0ee9f73834 Mon Sep 17 00:00:00 2001 From: tux Date: Tue, 28 Jul 2026 22:21:42 +0530 Subject: [PATCH] feat(canopus): setup nvidia --- modules/hosts/canopus/hardware.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/hosts/canopus/hardware.nix b/modules/hosts/canopus/hardware.nix index ee8c226..89dcad4 100644 --- a/modules/hosts/canopus/hardware.nix +++ b/modules/hosts/canopus/hardware.nix @@ -3,6 +3,7 @@ flake.modules.nixos.canopus = { lib, + pkgs, system, ... }@innerArgs: @@ -14,6 +15,7 @@ ] ++ [ inputs.nixos-hardware.nixosModules.asus-zephyrus-ga503 ]; + boot.kernelParams = [ "nvidia-drm.modeset=1" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" @@ -26,9 +28,18 @@ boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - hardware.cpu.amd.updateMicrocode = lib.mkDefault innerArgs.config.hardware.enableRedistributableFirmware; + hardware = { + nvidia = { + modesetting.enable = true; + open = false; + nvidiaSettings = true; + }; + + cpu.amd.updateMicrocode = lib.mkDefault innerArgs.config.hardware.enableRedistributableFirmware; + }; services = { + xserver.videoDrivers = [ "nvidia" ]; power-profiles-daemon.enable = true; upower.enable = true; @@ -129,6 +140,11 @@ }; networking.useDHCP = lib.mkDefault true; + nixpkgs.config.cudaSupport = true; nixpkgs.hostPlatform = lib.mkDefault system; + + environment.systemPackages = with pkgs; [ + nvtopPackages.full + ]; }; }