Compare commits

..

1 commit

Author SHA1 Message Date
1508558a21
factor out nixos conf
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-09-18 19:24:08 +02:00
2 changed files with 7 additions and 13 deletions

View file

@ -5,9 +5,9 @@
*/ */
{ {
nixosConfiguration, nixpkgs,
hostKeys ? { }, hostKeys ? { },
nixpkgs ? (import ../npins).nixpkgs, nixosConfiguration,
}: }:
let let
@ -44,7 +44,7 @@ let
imports = [ "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" ]; imports = [ "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" ];
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
services.getty.autologinUser = lib.mkForce "root"; services.getty.autologinUser = lib.mkForce "root";
programs.bash.loginShellInit = lib.getExe bootstrap; programs.bash.loginShellInit = nixpkgs.lib.getExe bootstrap;
isoImage = { isoImage = {
compressImage = false; compressImage = false;
@ -55,10 +55,4 @@ let
}; };
}; };
in in
(import "${nixpkgs}/nixos/lib/eval-config.nix" { (nixpkgs.lib.nixosSystem { modules = [ installer ]; }).config.system.build.isoImage
modules = [ installer ];
# Allow system to be set modularly in nixpkgs.system.
# We set it to null, to remove the "legacy" entrypoint's
# non-hermetic default.
system = null;
}).config.system.build.isoImage

View file

@ -223,9 +223,9 @@ build_iso () {
nix build \ nix build \
--impure --expr " --impure --expr "
let flake = builtins.getFlake (builtins.toString ./.); in let flake = builtins.getFlake (builtins.toString ./.); in
import ./infra/makeInstallerIso.nix { import ./makeInstallerIso.nix {
nixosConfiguration = flake.nixosConfigurations.$vm_name; nixosConfiguration = flake.nixosConfigurations.$vm_name;
# FIXME pass nixpkgs from npins nixpkgs = flake.inputs.nixpkgs;
$nix_host_keys $nix_host_keys
} }
" \ " \
@ -239,7 +239,7 @@ Check the Nix logs and fix things. Possibly there just is no NixOS configuration
"$vm_name" "$vm_name"
fi fi
ln -sf "$(ls "$tmpdir/installer-$vm_name"/iso/nixos-*.iso)" "$tmpdir/installer-$vm_name.iso" ln -sf "$tmpdir/installer-$vm_name/iso/installer.iso" "$tmpdir/installer-$vm_name.iso"
printf 'done building ISO for VM %s.\n' "$vm_name" printf 'done building ISO for VM %s.\n' "$vm_name"
release_lock build release_lock build