Update configuration.nix
This commit is contained in:
@@ -221,7 +221,6 @@
|
|||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
# Match the root filesystem device by label (or use PARTLABEL/UUID if preferred)
|
# 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"
|
KERNEL=="sd*", ENV{ID_FS_LABEL}=="nixos-root", SYMLINK+="nixos-root-device"
|
||||||
|
|
||||||
# Trigger when the root device is removed
|
# 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"
|
ACTION=="remove", KERNEL=="sd*", ENV{ID_FS_LABEL}=="nixos-root", RUN+="/run/current-system/sw/bin/systemctl poweroff"
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user