From 23d4350b1c6664492a64656bdcf5d559ad2498a7 Mon Sep 17 00:00:00 2001 From: Kate Adkins Date: Sun, 24 Nov 2024 14:00:06 -0700 Subject: [PATCH] valere: config volume, default to lowpower --- nixos/configs/gui/niri.nix | 1 + nixos/hosts/valere/default.nix | 20 +++++++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/nixos/configs/gui/niri.nix b/nixos/configs/gui/niri.nix index bf6ef61..922abf1 100644 --- a/nixos/configs/gui/niri.nix +++ b/nixos/configs/gui/niri.nix @@ -228,6 +228,7 @@ in "XF86Launch6".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1-"; "XF86Tools".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1+"; "XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; + "XF86AudioMicMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; "XF86MonBrightnessDown".action = sh "brightnessctl set 10%-"; "XF86MonBrightnessUp".action = sh "brightnessctl set 10%+"; diff --git a/nixos/hosts/valere/default.nix b/nixos/hosts/valere/default.nix index 1284486..e9c0362 100644 --- a/nixos/hosts/valere/default.nix +++ b/nixos/hosts/valere/default.nix @@ -53,7 +53,8 @@ services.xserver.videoDrivers = ["nvidia"]; # Set up the NVIDIA half of the GPU setup. - system.nixos.tags = ["NVIDIA" "Intel"]; + # These are used only in the "enabled" configuration. + system.nixos.tags = ["Intel"]; hardware.nvidia = { modesetting.enable = true; @@ -74,18 +75,15 @@ }; - # Provide a way to disable the NVIDIA GPU entirely, - # for points when traveling where we don't want to burn power. - specialisation.lowpower.configuration = { - system.nixos.tags = lib.mkForce ["Intel"]; + # Disable the NVIDIA GPU unless we explicitly request it. + hardware.nvidiaOptimus.disable = true; - # Disable the NVIDIA GPU. - hardware.nvidiaOptimus.disable = true; + # Provide a configuration that uses the full GPU power of the system. + specialisation.optimus.configuration = { + system.nixos.tags = lib.mkForce ["NVIDIA"]; - # These don't actually do anything, but they make introspecting - # the configuration a bit nicer. - hardware.nvidia.modesetting.enable = lib.mkForce false; - hardware.nvidia.prime.sync.enable = lib.mkForce false; + # Don't disable optimus on this config. + hardware.nvidiaOptimus.disable = lib.mkForce false; }; # Provide memtest86, since that's nice.