diff --git a/hosts/petalburg/default.nix b/hosts/petalburg/default.nix index 74c1c4c4..932ec9f9 100644 --- a/hosts/petalburg/default.nix +++ b/hosts/petalburg/default.nix @@ -37,18 +37,19 @@ runtimeInputs = [pkgs.libnotify pkgs.power-profiles-daemon]; text = '' - current_profile=$(powerprofilesctl get | tr -d '[:space:]') + # Only works on petalburg. + current_profile=$(${pkgs.power-profiles-daemon}/bin/powerprofilesctl get | tr -d '[:space:]') if [ "$current_profile" == "power-saver" ]; then - powerprofilesctl set balanced + ${pkgs.power-profiles-daemon}/bin/powerprofilesctl set balanced elif [ "$current_profile" == "balanced" ]; then - powerprofilesctl set performance + ${pkgs.power-profiles-daemon}/bin/powerprofilesctl set performance elif [ "$current_profile" == "performance" ]; then - powerprofilesctl set power-saver + ${pkgs.power-profiles-daemon}/bin/powerprofilesctl set power-saver fi - new_profile=$(powerprofilesctl get | tr -d '[:space:]') - notify-send "Power profile set to $new_profile." + new_profile=$(${pkgs.power-profiles-daemon}/bin/powerprofilesctl get | tr -d '[:space:]') + ${pkgs.libnotify}/bin/notify-send "Power profile set to $new_profile." ''; }; in {