From 712a66f7f63e1eed260c3f48382c0bbadfe3df8e Mon Sep 17 00:00:00 2001 From: Kate Adkins Date: Mon, 25 Nov 2024 09:36:34 -0700 Subject: [PATCH] talon: switch community to submodule --- nixos/configs/ccache.nix | 10 +++++- nixos/hosts/valere/default.nix | 65 +++++++++++++++++----------------- 2 files changed, 42 insertions(+), 33 deletions(-) diff --git a/nixos/configs/ccache.nix b/nixos/configs/ccache.nix index 40bea88..3d25330 100644 --- a/nixos/configs/ccache.nix +++ b/nixos/configs/ccache.nix @@ -3,7 +3,10 @@ # { config, ... }: { - programs.ccache.enable = true; + programs.ccache = { + enable = true; + cacheDir = "/nix/var/cache/ccache"; + }; nix.settings.extra-sandbox-paths = [ config.programs.ccache.cacheDir ]; nixpkgs.overlays = [ @@ -14,6 +17,11 @@ export CCACHE_DIR="${config.programs.ccache.cacheDir}" export CCACHE_UMASK=007 + ls -lah /tmp + ls -lah /nix + ls -lah /nix/var + ls -lah /nix/var/cache + if [ ! -d "$CCACHE_DIR" ]; then echo "=====" echo "Directory '$CCACHE_DIR' does not exist" diff --git a/nixos/hosts/valere/default.nix b/nixos/hosts/valere/default.nix index e9c0362..a5ed9b7 100644 --- a/nixos/hosts/valere/default.nix +++ b/nixos/hosts/valere/default.nix @@ -32,7 +32,7 @@ environment.systemPackages = [ deprekages.humanfx - # NVIDIA tools. + # NVIDIA tools. pkgs.nvitop ]; @@ -50,11 +50,11 @@ # Intel+NVIDIA / prime setup. # - services.xserver.videoDrivers = ["nvidia"]; + services.xserver.videoDrivers = [ "nvidia" ]; - # Set up the NVIDIA half of the GPU setup. - # These are used only in the "enabled" configuration. - system.nixos.tags = ["Intel"]; + # Set up the NVIDIA half of the GPU setup. + # These are used only in the "enabled" configuration. + system.nixos.tags = [ "Intel" ]; hardware.nvidia = { modesetting.enable = true; @@ -64,39 +64,51 @@ # Enable the nvidia-settings command. nvidiaSettings = true; - # Offloading setup: use GPU when asked for by command, and not otherwise. - prime = { - sync.enable = true; + # Offloading setup: use GPU when asked for by command, and not otherwise. + prime = { + sync.enable = true; - # Specify how to find our GPUs. - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; - }; + # Specify how to find our GPUs. + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; }; - # Disable the NVIDIA GPU unless we explicitly request it. - hardware.nvidiaOptimus.disable = true; + # Disable the NVIDIA GPU unless we explicitly request it. + hardware.nvidiaOptimus.disable = true; - # Provide a configuration that uses the full GPU power of the system. + # Provide a configuration that uses the full GPU power of the system. specialisation.optimus.configuration = { - system.nixos.tags = lib.mkForce ["NVIDIA"]; + system.nixos.tags = lib.mkForce [ "NVIDIA" ]; - # Don't disable optimus on this config. - hardware.nvidiaOptimus.disable = lib.mkForce false; + # Don't disable optimus on this config. + hardware.nvidiaOptimus.disable = lib.mkForce false; }; - # Provide memtest86, since that's nice. + # Provide memtest86, since that's nice. boot.loader.systemd-boot.memtest86.enable = true; # # Hardware config. # - # Use the latest kernel, until the Dell stuff makes it into - # more mainline kernels.~ + # Use the latest kernel, and our patches, until the Dell+Alienware stuff makes it into + # more mainline kernels. We'll include ccache so we can iterate sanely. boot.kernelPackages = pkgs.linuxPackages_latest; + # Support the Dell Privacy Driver. + boot.kernelPatches = [ + { + name = "enable-dell-privacy"; + patch = ./00-support-dell-smbios.patch; + + extraStructuredConfig = with lib.kernel; { + DELL_WMI_PRIVACY = yes; + }; + } + ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" @@ -115,17 +127,6 @@ ]; boot.extraModulePackages = [ config.boot.kernelPackages.acpi_call ]; - # Support the Dell Privacy Driver. - boot.kernelPatches = [ { - name = "enable-dell-privacy"; - patch = ./00-support-dell-smbios.patch; - - extraStructuredConfig = with lib.kernel; { - DELL_WMI_PRIVACY = yes; - }; - - } ]; - # Support thunderbolt. services.hardware.bolt.enable = true;