This commit is contained in:
2026-08-21 05:08:30 +09:00
parent 717572ae24
commit 95f74aabcd
3 changed files with 10 additions and 1 deletions
+5
View File
@@ -4,6 +4,11 @@
...
}:
{
# This desktop is permanently connected to AC power.
systemd.user.services.swayidle.Service.Environment = [
"SWAYIDLE_ASSUME_AC=1"
];
services.kanshi = {
enable = true;
+3 -1
View File
@@ -10,6 +10,8 @@ let
brightnessState = "$XDG_RUNTIME_DIR/swayidle-brightness";
onBattery = pkgs.writeShellScript "swayidle-on-battery" ''
[ "''${SWAYIDLE_ASSUME_AC:-0}" = 1 ] && exit 1
for supply in /sys/class/power_supply/*; do
[ -f "$supply/type" ] || continue
[ "$(< "$supply/type")" = "Battery" ] || continue
@@ -45,7 +47,7 @@ let
'';
suspend = pkgs.writeShellScript "swayidle-suspend" ''
if ${onBattery}; then
if ${onBattery} || ${isLocked}; then
exec ${systemctl} suspend
fi
'';
+2
View File
@@ -13,6 +13,7 @@
"https://moons-dotfiles.cachix.org"
"https://noctalia.cachix.org"
"https://vicinae.cachix.org"
"https://ghostty.cachix.org"
"https://cache.numtide.com"
"https://codex-desktop-linux.cachix.org"
];
@@ -23,6 +24,7 @@
"moons-dotfiles.cachix.org-1:WHoroKiNScG2/dpxHHL1I0qVmvuQhJbEAP+DS2j9Rr0="
"noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4="
"vicinae.cachix.org-1:1kDrfienkGHPYbkpNj1mWTr7Fm1+zcenzgTizIcI3oc="
"ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns="
"niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g="
"codex-desktop-linux.cachix.org-1:nX/xy6AdK9hQE24A8ALGjkCKj2ObFmcnemiL5Cid4nk="
];