{ inputs, self, lib, }: let specialArgs = { inherit inputs self; }; in { # Build a full NixOS host from hosts/. mkHost = { hostname, system ? "x86_64-linux", extraModules ? [ ], }: lib.nixosSystem { inherit specialArgs; modules = [ { nixpkgs.hostPlatform = system; nixpkgs.overlays = [ self.overlays.default ]; nixpkgs.config.allowUnfree = true; networking.hostName = hostname; } inputs.home-manager.nixosModules.home-manager inputs.agenix.nixosModules.default inputs.disko.nixosModules.disko inputs.lanzaboote.nixosModules.lanzaboote inputs.noctalia.nixosModules.default self.nixosModules.default ../hosts/${hostname} { home-manager = { useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "hm-backup"; extraSpecialArgs = specialArgs; sharedModules = [ inputs.noctalia.homeModules.default self.homeModules.default ]; }; } ] ++ extraModules; }; # Live installer ISO that carries this flake and the install tooling. mkInstaller = { system ? "x86_64-linux", }: lib.nixosSystem { inherit specialArgs; modules = [ "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" { nixpkgs.hostPlatform = system; nixpkgs.overlays = [ self.overlays.default ]; } ../modules/installer ]; }; }