nixos-config/machine/not522/installer/default.nix

31 lines
943 B
Nix
Raw Normal View History

2024-10-30 08:06:52 +00:00
{
nixos-config,
config,
pkgs,
nixpkgs,
2024-10-30 08:06:52 +00:00
...
2024-11-09 14:02:26 +00:00
}:
{
2024-10-30 08:06:52 +00:00
networking.hostName = "not522-installer";
imports = [
"${nixos-config}/config"
"${nixos-config}/machine/not522/hardware.nix"
"${nixos-config}/machine/not522/cross-packages.nix"
./disko.nix
"${nixpkgs}/nixos/modules/profiles/minimal.nix"
2024-10-30 08:06:52 +00:00
];
system.stateVersion = config.system.nixos.version;
#environment.etc."system/not522".source = "${nixos-config.nixosConfigurations.not522.config.system.build.toplevel}";
#environment.etc."system/not522-disko".source = "${nixos-config.nixosConfigurations.not522.config.system.build.diskoScript}";
2024-10-30 08:06:52 +00:00
environment.systemPackages = [
(pkgs.writeShellScriptBin "install-nixos-unattended" ''
set -eux
exec ${pkgs.disko}/bin/disko-install --flake "${nixos-config}#not522" --disk main "${nixos-config.nixosConfigurations.not522.config.disko.devices.disk.main.device}"
'')
];
isInstaller = true;
2024-10-30 08:06:52 +00:00
}