Move disabling wifi power saving to a host-specific file.

This commit is contained in:
Tom Alexander 2025-01-18 11:48:53 -05:00
parent 5170678a25
commit 8ac235cb8c
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
4 changed files with 19 additions and 4 deletions

View File

@ -6,6 +6,7 @@
./optimized_build.nix ./optimized_build.nix
./power_management.nix ./power_management.nix
./screen_brightness.nix ./screen_brightness.nix
./wifi.nix
]; ];
# Generate with `head -c4 /dev/urandom | od -A none -t x4` # Generate with `head -c4 /dev/urandom | od -A none -t x4`

View File

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ];
config = {
environment.loginShellInit = lib.mkIf (!config.me.buildingIso) ''
doas iw dev wlan0 set power_save off
'';
};
}

View File

@ -16,7 +16,6 @@
lxqt.lxqt-policykit # Need a polkit agent to launch the keyboard configurator lxqt.lxqt-policykit # Need a polkit agent to launch the keyboard configurator
]; ];
# TODO: Switch sway to using seatd instead of polkit
systemd = { systemd = {
user.services.lxqt-policykit-agent = { user.services.lxqt-policykit-agent = {
description = "lxqt-policykit-agent"; description = "lxqt-policykit-agent";

View File

@ -383,9 +383,8 @@ in
services.gvfs.enable = true; services.gvfs.enable = true;
# Auto-launch sway # Auto-launch sway
environment.loginShellInit = '' # Run sway as the absolute last command in the login shell init. mkBefore = 500, plain = 1000, mkAfter = 1500
# TODO: This shouldn't be shoe-horned into the sway config environment.loginShellInit = lib.mkOrder 2000 ''
doas iw dev wlan0 set power_save off
[ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ] && [ "$(tty)" = "/dev/tty1" ] && exec ${pkgs.systemd}/bin/systemd-cat --identifier=sway sway [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ] && [ "$(tty)" = "/dev/tty1" ] && exec ${pkgs.systemd}/bin/systemd-cat --identifier=sway sway
''; '';
}; };