fix: work on making the installer work offline
This commit is contained in:
@@ -34,6 +34,11 @@
|
|||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "The main disk device to use for installation.";
|
description = "The main disk device to use for installation.";
|
||||||
};
|
};
|
||||||
|
useSwap = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "Whether to create and use a swap partition.";
|
||||||
|
};
|
||||||
swapSize = lib.mkOption {
|
swapSize = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "The size of the swap partition.";
|
description = "The size of the swap partition.";
|
||||||
@@ -115,7 +120,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Swap Partition (size configurable per host)
|
# Swap Partition (size configurable per host)
|
||||||
swap = {
|
swap = lib.mkIf config.athenix.host.filesystem.useSwap {
|
||||||
name = "swap";
|
name = "swap";
|
||||||
label = "swap";
|
label = "swap";
|
||||||
size = config.athenix.host.filesystem.swapSize;
|
size = config.athenix.host.filesystem.swapSize;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# ========== Filesystem Configuration ==========
|
# ========== Filesystem Configuration ==========
|
||||||
athenix.host.filesystem.swapSize = lib.mkDefault "0G";
|
athenix.host.filesystem.useSwap = lib.mkDefault false;
|
||||||
athenix.host.filesystem.device = lib.mkDefault "/dev/mmcblk0";
|
athenix.host.filesystem.device = lib.mkDefault "/dev/mmcblk0";
|
||||||
athenix.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
athenix.host.buildMethods = lib.mkDefault [ "installer-iso" ];
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
# Ensure the entire system closure and all dependencies are included in the ISO
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.bashInteractive
|
pkgs.bashInteractive
|
||||||
@@ -20,6 +21,14 @@
|
|||||||
targetSystem
|
targetSystem
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Explicitly include the system closure in the ISO image to prevent any need to build or fetch
|
||||||
|
isoImage.contents = [
|
||||||
|
{
|
||||||
|
source = targetSystem;
|
||||||
|
target = "/system";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = hostPlatform;
|
nixpkgs.hostPlatform = hostPlatform;
|
||||||
|
|
||||||
systemd.services.auto-install = {
|
systemd.services.auto-install = {
|
||||||
@@ -45,7 +54,13 @@
|
|||||||
${diskoScript}
|
${diskoScript}
|
||||||
|
|
||||||
echo ">>> Running nixos-install..."
|
echo ">>> Running nixos-install..."
|
||||||
nixos-install --no-root-passwd --system ${targetSystem}
|
# Use only local store - don't fetch from binary cache or build
|
||||||
|
nixos-install \
|
||||||
|
--no-root-passwd \
|
||||||
|
--root /mnt \
|
||||||
|
--system ${targetSystem} \
|
||||||
|
--option substitute false \
|
||||||
|
--option build-use-sandbox false
|
||||||
|
|
||||||
echo ">>> Done. Rebooting."
|
echo ">>> Done. Rebooting."
|
||||||
systemctl reboot
|
systemctl reboot
|
||||||
|
|||||||
@@ -139,6 +139,8 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ========== ZimaBoard Desktops ==========
|
||||||
|
# Creates: nix-zima1, nix-zima2, nix-zima3
|
||||||
nix-zima.devices = 3;
|
nix-zima.devices = 3;
|
||||||
|
|
||||||
# ========== Ephemeral/Netboot System ==========
|
# ========== Ephemeral/Netboot System ==========
|
||||||
|
|||||||
Reference in New Issue
Block a user