From d4431509de10e1ed404d463b235107034af437c9 Mon Sep 17 00:00:00 2001 From: Kate Temkin Date: Thu, 12 Jun 2025 05:22:33 +0200 Subject: [PATCH] niri: switch to supersonic; trailblazer: ready for energy saving? --- nixos/configs/gui/niri.nix | 14 ++++++++------ nixos/hosts/trailblazer/default.nix | 1 + nixos/hosts/trailblazer/energy.nix | 8 ++++++++ nixos/packages/default.pkgs.nix | 1 + nixos/packages/gui.pkgs.nix | 2 +- 5 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 nixos/hosts/trailblazer/energy.nix diff --git a/nixos/configs/gui/niri.nix b/nixos/configs/gui/niri.nix index 32b2449..82e63b3 100644 --- a/nixos/configs/gui/niri.nix +++ b/nixos/configs/gui/niri.nix @@ -265,8 +265,8 @@ in "XF86AudioRaiseVolume".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1+"; "XF86AudioLowerVolume".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1-"; - "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+"; + "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"; @@ -284,10 +284,12 @@ in "Mod+Q".action = close-window; - "XF86AudioPrev".action = sh "mpc prev"; - "XF86AudioNext".action = sh "mpc next"; - "XF86AudioPlay".action = sh "mpc toggle"; - "XF86Launch5".action = sh "mpc toggle"; + "XF86AudioPrev".action = sh "supersonic -previous"; + "XF86AudioNext".action = sh "supersonic -next"; + "XF86AudioPlay".action = sh "supersonic -play-pause"; + + "XF86Launch5".action = sh "supersonic -play-pause"; + } (binds { suffixes."Left" = "column-left"; diff --git a/nixos/hosts/trailblazer/default.nix b/nixos/hosts/trailblazer/default.nix index 7c2639a..5b82165 100644 --- a/nixos/hosts/trailblazer/default.nix +++ b/nixos/hosts/trailblazer/default.nix @@ -145,6 +145,7 @@ in imports = [ #./ups.nix + ./energy.nix ./scanner.nix (modulesPath + "/installer/scan/not-detected.nix") ../../configs/build-machine-users.nix diff --git a/nixos/hosts/trailblazer/energy.nix b/nixos/hosts/trailblazer/energy.nix new file mode 100644 index 0000000..80a4ca2 --- /dev/null +++ b/nixos/hosts/trailblazer/energy.nix @@ -0,0 +1,8 @@ +# +# Energy savings for trailblazer. +# +{ ... }: +{ + # Allow WoL from being targeted by e.g. a SSH connection. + networking.interfaces."enp14s0".wakeOnLan.policy = [ "magic" "unicast" ]; +} diff --git a/nixos/packages/default.pkgs.nix b/nixos/packages/default.pkgs.nix index eefc6a7..260872a 100644 --- a/nixos/packages/default.pkgs.nix +++ b/nixos/packages/default.pkgs.nix @@ -252,6 +252,7 @@ with pkgs; ++ ( if (!is-hm-standalone && !is-droid) then [ + ethtool ] else [ ] diff --git a/nixos/packages/gui.pkgs.nix b/nixos/packages/gui.pkgs.nix index 8651743..973370f 100644 --- a/nixos/packages/gui.pkgs.nix +++ b/nixos/packages/gui.pkgs.nix @@ -58,7 +58,7 @@ with pkgs; # Office. thunderbird - libreoffice-fresh + (libreoffice-fresh.override { extraMakeWrapperArgs = ["--unset" "WAYLAND_DISPLAY"]; }) krita xournalpp kdePackages.itinerary