Archived
Authorize the WSL workstation as a nix-cache remote-builder client
Check NixOS configurations / eval-hosts (push) Failing after 11m55s
Check NixOS configurations / eval-hosts (push) Failing after 11m55s
Adds debian@surface's existing SSH key (already used as its admin key elsewhere in this repo) to vars.remoteBuilderAuthorizedKeys so nix-cache will accept it as a distributed-build client once deployed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01La55Nsss8jZ7ZuzUV9mfot
This commit is contained in:
+9
-2
@@ -52,8 +52,15 @@ The generated menu currently exposes entries for:
|
|||||||
- iPXE shell
|
- iPXE shell
|
||||||
- Reboot
|
- Reboot
|
||||||
|
|
||||||
Kernel and initrd artifacts for the NixOS installer entry must be placed under
|
The NixOS installer entry chain-loads `/srv/pxe/http/nixos/netboot.ipxe`,
|
||||||
`/srv/pxe/http/nixos` by an operator or a separate build process.
|
which is nixpkgs' own generated netboot iPXE script (correct `init=`/`initrd=`
|
||||||
|
kernel parameters included) rather than a hand-rolled boot line — that script
|
||||||
|
in turn expects its kernel/initrd siblings in the same directory. All three
|
||||||
|
files (`bzImage`, `initrd`, `netboot.ipxe`) are built from this flake's own
|
||||||
|
`modules/installer/iso.nix` netboot image (the same one `nix build .#pxe`
|
||||||
|
produces) and staged automatically by
|
||||||
|
`modules/pxe-boot/stage-installer-artifacts.nix` via `systemd.tmpfiles.rules`
|
||||||
|
— no manual operator step required.
|
||||||
|
|
||||||
The SystemRescue entry expects the source ISO at:
|
The SystemRescue entry expects the source ISO at:
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
./modules/nix-cache/client.nix
|
./modules/nix-cache/client.nix
|
||||||
./modules/nix-cache/remote-builder-client.nix
|
./modules/nix-cache/remote-builder-client.nix
|
||||||
];
|
];
|
||||||
specialArgs = { inherit inputs vars; };
|
specialArgs = { inherit inputs vars netbootSystem; };
|
||||||
};
|
};
|
||||||
|
|
||||||
# Generated platform x build-type matrix. pxe-boot has no linode
|
# Generated platform x build-type matrix. pxe-boot has no linode
|
||||||
|
|||||||
@@ -76,9 +76,7 @@ let
|
|||||||
choose target && goto ''${target}
|
choose target && goto ''${target}
|
||||||
|
|
||||||
:nixos
|
:nixos
|
||||||
kernel ''${base}/nixos/bzImage ip=dhcp
|
chain ''${base}/nixos/netboot.ipxe
|
||||||
initrd ''${base}/nixos/initrd
|
|
||||||
boot
|
|
||||||
|
|
||||||
:rescue
|
:rescue
|
||||||
chain ''${base}/systemrescue.ipxe
|
chain ''${base}/systemrescue.ipxe
|
||||||
@@ -91,6 +89,10 @@ let
|
|||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
../pxe-boot/stage-installer-artifacts.nix
|
||||||
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
ipxe
|
ipxe
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{ netbootSystem, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
# config.system.build.kernel and .netbootRamdisk are directories, not the
|
||||||
|
# files themselves — nixpkgs' own system.build.kexecTree does the same
|
||||||
|
# ${...}/<file> dereference for the same reason.
|
||||||
|
inherit (netbootSystem.config.system.boot.loader) kernelFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Builds this flake's own installer netboot image (the same one
|
||||||
|
# `nix build .#pxe` produces) and stages it where menu.ipxe's :nixos
|
||||||
|
# entry expects it, so the pxe-boot host is self-contained — no manual
|
||||||
|
# operator step to populate /srv/pxe/http/nixos after deploy.
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
# Declared here too (not just in build-types/pxe-boot.nix) so this
|
||||||
|
# module's C+ rules don't depend on cross-module list-merge ordering —
|
||||||
|
# tmpfiles' C type needs the target directory to already exist.
|
||||||
|
"d /srv/pxe/http/nixos 0755 root root -"
|
||||||
|
"C+ /srv/pxe/http/nixos/${kernelFile} 0644 root root - ${netbootSystem.config.system.build.kernel}/${kernelFile}"
|
||||||
|
"C+ /srv/pxe/http/nixos/initrd 0644 root root - ${netbootSystem.config.system.build.netbootRamdisk}/initrd"
|
||||||
|
"C+ /srv/pxe/http/nixos/netboot.ipxe 0644 root root - ${netbootSystem.config.system.build.netbootIpxeScript}/netboot.ipxe"
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKKKzoEPl/ZW9KBRHBcp6/ThOngGpwMv5EhkTlgC4aDf root@nixos"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKKKzoEPl/ZW9KBRHBcp6/ThOngGpwMv5EhkTlgC4aDf root@nixos"
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIGtOWOCS+ImHc7NehguoyD7PbonGosKMZqc9+QR3v/h root@nixos"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIGtOWOCS+ImHc7NehguoyD7PbonGosKMZqc9+QR3v/h root@nixos"
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHxXTQxFnArK5HXG7czeoybZebCGfxpUdusJkPn+BCSp root@server"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHxXTQxFnArK5HXG7czeoybZebCGfxpUdusJkPn+BCSp root@server"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICMJhrfFayLBG+gWtO6oAvgambw5nWWgztiTFEaaaVRH debian@surface"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Admin SSH public key, authorized on the primary user of every host and
|
# Admin SSH public key, authorized on the primary user of every host and
|
||||||
|
|||||||
Reference in New Issue
Block a user