{ description = "Auto-install NixOS ISO"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; nixos-conf-editor.url = "github:snowfallorg/nixos-conf-editor"; flake-utils.url = "github:numtide/flake-utils"; home-manager = { url = "github:nix-community/home-manager/release-26.05"; inputs.nixpkgs.follows = "nixpkgs"; }; disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, flake-utils, home-manager, ... }: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; netbootSystem = nixpkgs.lib.nixosSystem { inherit system; modules = [ ./installer.nix ({ modulesPath, ... }: { imports = [ (modulesPath + "/installer/netboot/netboot-minimal.nix") ]; }) ]; }; in { # # Complete NixOS systems # # These can be used with: # # nixos-rebuild switch --flake .#name # nixosConfigurations = { installer = nixpkgs.lib.nixosSystem { inherit system; modules = [ ./installer.nix ]; }; proxmox-lxc = nixpkgs.lib.nixosSystem { inherit system; modules = [ ./proxmox-lxc.nix ]; }; }; # # Buildable artifacts # # These are built with: # # nix build .#name # packages.${system} = { netboot-ipxe = netbootSystem.config.system.build.netbootIpxeScript; netboot-initrd = netbootSystem.config.system.build.netbootRamdisk; netboot-kernel = netbootSystem.config.system.build.kernel; images = pkgs.linkFarm "images" [ { name = "installer-iso"; path = self.nixosConfigurations.installer.config.system.build.isoImage; } { name = "proxmox-lxc"; path = self.nixosConfigurations.proxmox-lxc.config.system.build.tarball; } ]; }; }; }