refactor: change usage of targetSystem to targetSystemBuild.toplevel
Some checks failed
CI / Format Check (push) Failing after 1s
CI / Flake Check (push) Has been skipped
CI / Evaluate Key Configurations (nix-builder) (push) Has been skipped
CI / Evaluate Key Configurations (nix-desktop1) (push) Has been skipped
CI / Evaluate Key Configurations (nix-laptop1) (push) Has been skipped
CI / Evaluate Artifacts (installer-iso-nix-laptop1) (push) Has been skipped
CI / Evaluate Artifacts (lxc-nix-builder) (push) Has been skipped
Some checks failed
CI / Format Check (push) Failing after 1s
CI / Flake Check (push) Has been skipped
CI / Evaluate Key Configurations (nix-builder) (push) Has been skipped
CI / Evaluate Key Configurations (nix-desktop1) (push) Has been skipped
CI / Evaluate Key Configurations (nix-laptop1) (push) Has been skipped
CI / Evaluate Artifacts (installer-iso-nix-laptop1) (push) Has been skipped
CI / Evaluate Artifacts (lxc-nix-builder) (push) Has been skipped
This commit is contained in:
@@ -33,11 +33,7 @@
|
||||
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
|
||||
system.extraDependencies = with targetSystemBuild; [
|
||||
toplevel
|
||||
etc
|
||||
bootStage2
|
||||
];
|
||||
system.extraDependencies = with targetSystemBuild; [ toplevel etc bootStage2 ];
|
||||
|
||||
isoImage.storeContents = [ targetSystemBuild.toplevel ];
|
||||
|
||||
@@ -58,35 +54,20 @@
|
||||
};
|
||||
|
||||
script = ''
|
||||
echo "=== AUTO INSTALL START for ${hostName} ==="
|
||||
echo "=== AUTO INSTALL START for ${hostName} ==="
|
||||
|
||||
echo ">>> Running disko script..."
|
||||
${diskoScript}
|
||||
echo ">>> Running disko script..."
|
||||
${diskoScript}
|
||||
|
||||
<<<<<<< HEAD
|
||||
echo ">>> Setting up NixOS..."
|
||||
nixos-install \
|
||||
--system ${targetSystemBuild.toplevel} \
|
||||
--no-root-passwd \
|
||||
--no-channel-copy \
|
||||
--substituters ""
|
||||
=======
|
||||
echo ">>> Copying system closure to target..."
|
||||
# Copy the entire system closure without substitution
|
||||
nix-store --store /mnt --load-db < <(nix-store --dump-db)
|
||||
nix-copy-closure --to /mnt ${targetSystem} 2>/dev/null || true
|
||||
echo ">>> Setting up NixOS..."
|
||||
nixos-install \
|
||||
--system ${targetSystemBuild.toplevel} \
|
||||
--no-root-passwd \
|
||||
--no-channel-copy \
|
||||
--substituters ""
|
||||
|
||||
echo ">>> Running nixos-install..."
|
||||
# Install with pre-built closure already in store
|
||||
nixos-install \
|
||||
--no-root-passwd \
|
||||
--root /mnt \
|
||||
--system ${targetSystem} \
|
||||
--option substitute false
|
||||
>>>>>>> parent of b23525d (fix: build closure in build-step instead of on iso)
|
||||
|
||||
echo ">>> Done. Rebooting."
|
||||
systemctl reboot
|
||||
echo ">>> Done. Rebooting."
|
||||
systemctl reboot
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user