build(nasp): enable zfs if networking.hostId is set

This commit is contained in:
Dict Xiong 2024-06-14 00:13:22 +08:00
parent 7d21133d72
commit 47d8b9fa41
10 changed files with 5 additions and 18 deletions

View File

@ -16,8 +16,6 @@
eth2Name = "enp2s0np0"; eth2Name = "enp2s0np0";
}; };
}; };
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "c953033f"; networking.hostId = "c953033f";
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View File

@ -16,8 +16,6 @@
eth2Name = "enp2s0np0"; eth2Name = "enp2s0np0";
}; };
}; };
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "50480d34"; networking.hostId = "50480d34";
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View File

@ -16,8 +16,6 @@
eth2Name = "enp2s0np0"; eth2Name = "enp2s0np0";
}; };
}; };
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "39c15810"; networking.hostId = "39c15810";
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View File

@ -16,8 +16,6 @@
eth2Name = "enp2s0np0"; eth2Name = "enp2s0np0";
}; };
}; };
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "32137a88"; networking.hostId = "32137a88";
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View File

@ -16,8 +16,6 @@
eth2Name = "enp2s0np0"; eth2Name = "enp2s0np0";
}; };
}; };
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "b500d22c"; networking.hostId = "b500d22c";
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View File

@ -16,8 +16,6 @@
eth2Name = "enp2s0np0"; eth2Name = "enp2s0np0";
}; };
}; };
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "6693ee3d"; networking.hostId = "6693ee3d";
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View File

@ -16,8 +16,6 @@
eth2Name = "enp2s0np0"; eth2Name = "enp2s0np0";
}; };
}; };
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "b24b8b5f"; networking.hostId = "b24b8b5f";
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View File

@ -16,8 +16,6 @@
eth2Name = "enp2s0np0"; eth2Name = "enp2s0np0";
}; };
}; };
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "94f672bf"; networking.hostId = "94f672bf";
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View File

@ -16,8 +16,6 @@
eth2Name = "enp2s0np0"; eth2Name = "enp2s0np0";
}; };
}; };
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "b2fd3ffb"; networking.hostId = "b2fd3ffb";
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View File

@ -133,6 +133,11 @@ in
xkb.layout = "us"; xkb.layout = "us";
}; };
} }
(lib.mkIf (networking.hostId != null) {
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
services.zfs.autoScrub.enable = true;
})
# nvidia # nvidia
(lib.mkIf (nvidiaCfg.enable) { (lib.mkIf (nvidiaCfg.enable) {
nixpkgs.config.nvidia.acceptLicense = true; nixpkgs.config.nvidia.acceptLicense = true;