2023-08-02 09:08:00 +00:00
|
|
|
{ self, lib, ... }:
|
|
|
|
let
|
2024-03-06 08:43:50 +00:00
|
|
|
installerModule = { config, pkgs, ... }: {
|
|
|
|
imports = [
|
2023-08-02 09:08:00 +00:00
|
|
|
self.nixosModules.installer
|
|
|
|
self.nixosModules.hidden-ssh-announce
|
|
|
|
self.inputs.nixos-generators.nixosModules.all-formats
|
|
|
|
self.inputs.disko.nixosModules.disko
|
|
|
|
];
|
2024-03-06 08:43:50 +00:00
|
|
|
|
|
|
|
system.stateVersion = config.system.nixos.version;
|
|
|
|
nixpkgs.pkgs = self.inputs.nixpkgs.legacyPackages.x86_64-linux;
|
|
|
|
};
|
|
|
|
|
2024-03-07 16:24:57 +00:00
|
|
|
installer = lib.nixosSystem {
|
|
|
|
modules = [
|
|
|
|
installerModule
|
|
|
|
{ disko.memSize = 4096; } # FIXME: otherwise the image builder goes OOM
|
|
|
|
];
|
|
|
|
};
|
2024-03-06 08:43:50 +00:00
|
|
|
|
|
|
|
clan = self.lib.buildClan {
|
|
|
|
clanName = "clan-core";
|
|
|
|
directory = self;
|
|
|
|
machines.installer = installerModule;
|
2023-08-02 09:08:00 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2024-03-06 08:43:50 +00:00
|
|
|
flake.packages.x86_64-linux.install-iso = self.inputs.disko.lib.makeDiskImages {
|
|
|
|
nixosConfig = installer;
|
|
|
|
};
|
2024-03-15 14:06:50 +00:00
|
|
|
flake.nixosConfigurations = { inherit (clan.nixosConfigurations) installer; };
|
2024-03-06 08:43:50 +00:00
|
|
|
flake.clanInternals = clan.clanInternals;
|
2023-08-02 09:08:00 +00:00
|
|
|
flake.apps.x86_64-linux.install-vm.program = installer.config.formats.vm.outPath;
|
|
|
|
flake.apps.x86_64-linux.install-vm-nogui.program = installer.config.formats.vm-nogui.outPath;
|
2023-07-12 16:25:25 +00:00
|
|
|
}
|