diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 96857dc..803fc96 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -22,7 +22,7 @@ boot.supportedFilesystems = [ "zfs" ]; boot.zfs.forceImportRoot = false; boot.zfs.package = pkgs.zfs_unstable; - boot.zfs.enabled = true; + #boot.zfs.enabled = true; # Mount server data #fileSystems."/srv" = { # device = "/dev/disk/by-label/server-data"; @@ -43,7 +43,14 @@ #system.userActivationScripts.createSetupSymlink.text = '' # ln -sf /mnt/docker-persistent-data/setup /home/nixos/setup #''; - +boot.postBootCommands = '' + echo "=== STARTING ZPOOL IMPORT ===" + ${pkgs.zfs}/bin/zpool import -a -N -d /dev/disk/by-path + ${pkgs.zfs}/bin/zpool status + ${pkgs.zfs}/bin/zfs mount -a + ${pkgs.zfs}/bin/zfs list + echo "=== ZPOOL IMPORT COMPLETE ===" +''; services.zfs = { autoScrub.enable = true; autoSnapshot.enable = true;