Compare commits

...

2 Commits

Author SHA1 Message Date
Noah Masur
83f548e95f
fix: power button immediately shuts down pc 2025-01-19 20:07:12 +00:00
Noah Masur
c66ca460c0
fix: desktop won't launch if xrandr fails 2025-01-19 20:06:33 +00:00
2 changed files with 10 additions and 7 deletions

View File

@ -37,17 +37,16 @@
# Set up screen position and rotation # Set up screen position and rotation
setupCommands = '' setupCommands = ''
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 \ ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 \
--mode 1920x1200 \
--pos 2560x0 \
--rotate left \
--output DisplayPort-0 \
--primary \ --primary \
--mode 2560x1440 \
--pos 0x560 \
--rotate normal \ --rotate normal \
--rate 120 \ --mode 2560x1440 \
--rate 165 \
--output DisplayPort-2 \
--right-of DisplayPort-1 \
--rotate left \
--output DVI-0 --off \ --output DVI-0 --off \
--output DVI-1 --off \ --output DVI-1 --off \
|| echo "xrandr failed"
''; '';
}; };
}; };

View File

@ -8,6 +8,10 @@
config = lib.mkIf (config.physical && !config.server) { config = lib.mkIf (config.physical && !config.server) {
# Use power button to sleep instead of poweroff
services.logind.powerKey = "suspend";
services.logind.powerKeyLongPress = "poweroff";
# Prevent wake from keyboard # Prevent wake from keyboard
powerManagement.powerDownCommands = '' powerManagement.powerDownCommands = ''
set +e set +e