Update configuration.nix

This commit is contained in:
ska
2025-12-22 16:25:39 +00:00
parent a1b3b29f42
commit 2ccfc15ab9

View File

@@ -213,18 +213,6 @@
zramSwap.enable = true; zramSwap.enable = true;
############################################################
# USB ROOT DEVICE MONITOR (SHUTDOWN ON DISCONNECT)
############################################################
# Monitor root device removal and shut down
services.udev.extraRules = ''
# Match the root filesystem device by label (or use PARTLABEL/UUID if preferred)
KERNEL=="sd*", ENV{ID_FS_LABEL}=="nixos-root", SYMLINK+="nixos-root-device"
# Trigger when the root device is removed
ACTION=="remove", KERNEL=="sd*", ENV{ID_FS_LABEL}=="nixos-root", RUN+="/run/current-system/sw/bin/systemctl poweroff"
'';
############################################################ ############################################################
# NIXOS VERSION # NIXOS VERSION
############################################################ ############################################################