Add disk shutdown for backup
This commit is contained in:
parent
746680731e
commit
bebb3da27a
1 changed files with 5 additions and 0 deletions
|
@ -29,6 +29,11 @@
|
|||
|
||||
swapDevices = [{ device = "/dev/mapper/swap"; }];
|
||||
|
||||
# Get disk identifier with `udevadm info -n /dev/sdX | grep ID_SERIAL_SHORT`
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", KERNEL=="sd[a-z]", ENV{ID_SERIAL_SHORT}=="WD-WXH1A89L54LA", RUN+="${pkgs.hdparm}/bin/hdparm -S 60 /dev/%k"
|
||||
'';
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue