{ description = "Homelab configuration"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; impermanence.url = "github:nix-community/impermanence"; # Sops-nix, a secrets manager sops-nix.url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, ... }@inputs: let outputs = self.outputs; utils = import ./utils.nix { inherit nixpkgs inputs outputs; }; homelabConfig = import ./config.nix; roles = import ./roles { inherit utils; }; hosts = import ./hosts.nix { inherit homelabConfig roles; }; in { nixosConfigurations = nixpkgs.lib.mapAttrs ( hostname: value: (utils.mkSystem { inherit hosts; hostConfig = (value // { inherit hostname; }); }) ) hosts; }; }