me like nix
0

Configure Feed

Select the types of activity you want to include in your feed.

Fix Pi WiFi power save and persist logs

author
Sean Aye
date (Jun 2, 2026, 9:26 PM -0400) commit dc5f02d0 parent dd8daddd change-id spkuxwsq
+18 -4
+3 -2
modules/pi-stability.nix
··· 17 17 rebootTime = "60s"; 18 18 }; 19 19 20 - # Reduce SD card writes - logs to tmpfs 20 + # Persist logs so failures can be diagnosed after reboot. 21 21 services.journald.extraConfig = '' 22 - Storage=volatile 22 + Storage=persistent 23 + SystemMaxUse=256M 23 24 RuntimeMaxUse=64M 24 25 ''; 25 26
+15 -2
modules/pi-wifi.nix
··· 41 41 42 42 systemd.services.wifi-powersave-off = { 43 43 description = "Disable WiFi power save"; 44 - after = [ "network.target" ]; 44 + after = [ "wpa_supplicant.service" "network.target" ]; 45 + wants = [ "wpa_supplicant.service" ]; 45 46 wantedBy = [ "multi-user.target" ]; 46 47 serviceConfig = { 47 48 Type = "oneshot"; 48 - ExecStart = "${pkgs.iw}/bin/iw dev wlan0 set power_save off"; 49 + ExecStart = pkgs.writeShellScript "wifi-powersave-off" '' 50 + set -eu 51 + 52 + for _ in $(seq 1 60); do 53 + if ${pkgs.iw}/bin/iw dev wlan0 set power_save off; then 54 + exit 0 55 + fi 56 + sleep 1 57 + done 58 + 59 + echo "failed to disable WiFi power save: wlan0 did not become ready" >&2 60 + exit 1 61 + ''; 49 62 RemainAfterExit = true; 50 63 }; 51 64 };