diff --git a/home/fish/interactive.fish b/home/fish/interactive.fish index 04ae800..c594843 100644 --- a/home/fish/interactive.fish +++ b/home/fish/interactive.fish @@ -1,3 +1,3 @@ -if test "$KITTY_STR" -eq 1 - fastfetch +if test "$KITTY_STR" = "1" + fastfetch end diff --git a/hosts/tardis/default.nix b/hosts/tardis/default.nix index 8e487ad..de27268 100644 --- a/hosts/tardis/default.nix +++ b/hosts/tardis/default.nix @@ -31,7 +31,7 @@ services.xserver = { enable = true; displayManager.startx.enable = true; - videoDrivers = [ "modesetting" ]; + videoDrivers = [ "modesetting" "nvidia" ]; xkb = { layout = "us"; variant = ""; diff --git a/hosts/tardis/nvidia.nix b/hosts/tardis/nvidia.nix new file mode 100644 index 0000000..883467c --- /dev/null +++ b/hosts/tardis/nvidia.nix @@ -0,0 +1,33 @@ +{ config, ... }: + +{ + nix.settings = { + substituters = [ "https://cache.nixos-cuda.org" ]; + trusted-public-keys = [ + "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" + ]; + }; + + hardware.graphics = { + enable = true; + }; + + services.xserver.videoDrivers = ["nvidia"]; + + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + powerManagement.finegrained = false; + open = true; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + prime = { + offload = { + enable = true; + enableOffloadCmd = true; + }; + intelBusId = "PCI:0@0:2:0"; + nvidiaBusId = "PCI:1@0:0:0"; + }; + }; +}