Build zfs into the ISO image.

This commit is contained in:
Tom Alexander 2025-01-19 15:23:38 -05:00
parent 7bc6e0c470
commit f2adb9328b
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 139 additions and 119 deletions

View File

@ -93,6 +93,7 @@
base_x86_64_linux base_x86_64_linux
// { // {
modules = base_x86_64_linux.modules ++ [ modules = base_x86_64_linux.modules ++ [
./hosts/odo
(nixpkgs + "/nixos/modules/installer/cd-dvd/iso-image.nix") (nixpkgs + "/nixos/modules/installer/cd-dvd/iso-image.nix")
# TODO: Figure out how to do image based appliances # TODO: Figure out how to do image based appliances
# (nixpkgs + "/nixos/modules/profiles/image-based-appliance.nix") # (nixpkgs + "/nixos/modules/profiles/image-based-appliance.nix")
@ -118,9 +119,8 @@
base_x86_64_linux base_x86_64_linux
// { // {
modules = base_x86_64_linux.modules ++ [ modules = base_x86_64_linux.modules ++ [
./hosts/neelix
(nixpkgs + "/nixos/modules/installer/cd-dvd/iso-image.nix") (nixpkgs + "/nixos/modules/installer/cd-dvd/iso-image.nix")
# TODO: Figure out how to do image based appliances
# (nixpkgs + "/nixos/modules/profiles/image-based-appliance.nix")
{ {
isoImage.makeEfiBootable = true; isoImage.makeEfiBootable = true;
isoImage.makeUsbBootable = true; isoImage.makeUsbBootable = true;

View File

@ -7,6 +7,9 @@
{ {
imports = [ ]; imports = [ ];
config = lib.mkMerge [
{ }
(lib.mkIf (!config.me.buildingIso) {
nix.settings.system-features = lib.mkForce [ nix.settings.system-features = lib.mkForce [
"gccarch-alderlake" "gccarch-alderlake"
"gccarch-x86-64-v3" "gccarch-x86-64-v3"
@ -20,6 +23,7 @@
# gcc.arch = "alderlake"; # gcc.arch = "alderlake";
# gcc.tune = "alderlake"; # gcc.tune = "alderlake";
# system = "x86_64-linux"; # system = "x86_64-linux";
# }; # };
nixpkgs.overlays = [ nixpkgs.overlays = [
@ -64,5 +68,11 @@
) )
]; ];
boot.kernelPackages = lib.mkIf (!config.me.buildingIso) (pkgs.linuxPackagesFor pkgs.linux_alderlake); boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_alderlake;
})
(lib.mkIf (config.me.buildingIso) {
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_12;
boot.supportedFilesystems = [ "zfs" ];
})
];
} }

View File

@ -7,6 +7,9 @@
{ {
imports = [ ]; imports = [ ];
config = lib.mkMerge [
{ }
(lib.mkIf (!config.me.buildingIso) {
nix.settings.system-features = lib.mkForce [ nix.settings.system-features = lib.mkForce [
"gccarch-znver4" "gccarch-znver4"
"gccarch-skylake" "gccarch-skylake"
@ -23,6 +26,7 @@
# gcc.arch = "znver4"; # gcc.arch = "znver4";
# gcc.tune = "znver4"; # gcc.tune = "znver4";
# system = "x86_64-linux"; # system = "x86_64-linux";
# }; # };
nixpkgs.overlays = [ nixpkgs.overlays = [
@ -67,5 +71,11 @@
) )
]; ];
boot.kernelPackages = lib.mkIf (!config.me.buildingIso) (pkgs.linuxPackagesFor pkgs.linux_znver4); boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_znver4;
})
(lib.mkIf (config.me.buildingIso) {
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_12;
boot.supportedFilesystems.zfs = true;
})
];
} }