diff --git a/base.nix b/base.nix index c84c27c..a23cc7d 100644 --- a/base.nix +++ b/base.nix @@ -50,9 +50,9 @@ #nix.optimize.automatic = true; # periodic optimization nix.gc.automatic = true; nix.gc.dates = "weekly"; - nix.gc.options = "--delete-older-than 30d"; - nix.settings.min-free = 1 * 1024 * 1024 * 1024; - nix.settings.max-free = 5 * 1024 * 1024 * 1024; + nix.gc.options = "--delete-older-than 15d"; + nix.settings.min-free = 3 * 1024 * 1024 * 1024; + nix.settings.max-free = 20 * 1024 * 1024 * 1024; services.thermald.enable = lib.mkIf (config.nixpkgs.system == "x86_64-linux") true; @@ -68,4 +68,10 @@ ]; networking.firewall.enable = true; # default + + # https://discourse.nixos.org/t/what-to-do-with-a-full-boot-partition/2049 + boot.loader.grub.configurationLimit = 15; + boot.loader.systemd-boot.configurationLimit = 15; + boot.loader.raspberryPi.uboot.configurationLimit = 15; + boot.loader.generic-extlinux-compatible.configurationLimit = 15; } diff --git a/hardware/gpu/cuda.nix b/hardware/gpu/cuda.nix index bfeb56a..8ba9a66 100644 --- a/hardware/gpu/cuda.nix +++ b/hardware/gpu/cuda.nix @@ -19,21 +19,31 @@ hardware.opengl.enable = true; hardware.opengl.driSupport = true; hardware.opengl.driSupport32Bit = true; - hardware.opengl.extraPackages = with pkgs; [ - #vaapiVdpau - #libvdpau-va-gl - nvidia-vaapi-driver + hardware.opengl.extraPackages = [ + #pkgs.vaapiVdpau + #pkgs.libvdpau-va-gl + pkgs.nvidia-vaapi-driver ]; + hardware.nvidia.modesetting.enable = lib.mkDefault true; # needed for most wayland compositors hardware.nvidia.nvidiaSettings = lib.mkDefault true; - #hardware.nvidia.open = lib.mkDefault true; # open source version of kernel module, only on driver 515.43.04+ - #hardware.nvidia.package = lib.mkDefault config.boot.kernelPackages.nvidiaPackages.latest; # only do this per-host - hardware.nvidia.powerManagement.enable = lib.mkDefault true; # Fix graphical corruption on suspend/resume virtualisation.docker.enableNvidia = lib.mkDefault true; virtualisation.podman.enableNvidia = lib.mkDefault true; + # only do this per-host + + #hardware.nvidia.open = lib.mkDefault true; # open source version of kernel module, only on driver 515.43.04+ + #hardware.nvidia.powerManagement.enable = lib.mkDefault true; # Fix graphical corruption on suspend/resume + #hardware.nvidia.powerManagement.finegrained = lib.mkDefault false; # Turns off GPU when not in use, Turing or newer + + # https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/nvidia-x11/default.nix + #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; + #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production; + #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest; + #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta; + # add this to the host in question: #hardware.nvidia.prime = { # offload.enable = true; diff --git a/hosts/sopp/default.nix b/hosts/sopp/default.nix index bc660f8..02474d7 100644 --- a/hosts/sopp/default.nix +++ b/hosts/sopp/default.nix @@ -13,8 +13,8 @@ systemd.services."autovt@tty1".enable = false; #boot.kernelPackages = pkgs.linuxPackages_latest; - #hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.latest; #hardware.nvidia.modesetting.enable = false; # makes atom behave, but mpv refuses to start + hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta; # PRIME: (lspci) #hardware.nvidia.prime.intelBusId = "PCI:0:02:0";