{ description = "Fudo Host Configuration"; inputs = { nixpkgs.url = "nixpkgs/nixos-21.05"; home-manager.url = "github:nix-community/home-manager/release-21.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; fudo-secrets.url = "path:/state/secrets"; }; outputs = { self, nixpkgs, home-manager, fudo-secrets, ... }: { nixosConfigurations = let lib = nixpkgs.lib; hostlib = import ./lib/hosts.nix { inherit lib; }; hosts = lib.filterAttrs (hostname: hostOpts: hostOpts.nixos-system) (hostlib.base-host-config ./config/hosts); build-timestamp = self.sourceInfo.lastModified; in lib.mapAttrs (hostname: hostOpts: let pkgs = import nixpkgs { system = hostOpts.arch; config = { allowUnfree = true; permittedInsecurePackages = [ "openssh-with-gssapi-8.4p1" ]; }; overlays = [ (import ./fudo-pkgs/overlay.nix) ]; }; in lib.nixosSystem { system = hostOpts.arch; modules = [ fudo-secrets.nixosModule "${home-manager}/nixos" (import ./initialize.nix { inherit hostname pkgs build-timestamp fudo-secrets; }) ]; }) hosts; }; }