zfs: Sync pools on shutdown.
This commit is contained in:
parent
69d8047516
commit
50925651bb
1 changed files with 5 additions and 0 deletions
|
@ -466,6 +466,11 @@ in
|
|||
'') rootPools));
|
||||
};
|
||||
|
||||
systemd.shutdownRamfs.contents."/etc/systemd/system-shutdown/zpool".source = pkgs.writeShellScript "zpool-sync-shutdown" ''
|
||||
exec ${cfgZfs.package}/bin/zpool sync
|
||||
'';
|
||||
systemd.shutdownRamfs.storePaths = ["${cfgZfs.package}/bin/zpool"];
|
||||
|
||||
# TODO FIXME See https://github.com/NixOS/nixpkgs/pull/99386#issuecomment-798813567. To not break people's bootloader and as probably not everybody would read release notes that thoroughly add inSystem.
|
||||
boot.loader.grub = mkIf (inInitrd || inSystem) {
|
||||
zfsSupport = true;
|
||||
|
|
Loading…
Reference in a new issue