config/flake.nix

25 lines
658 B
Nix

{
description = "Homelab configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
impermanence.url = "github:nix-community/impermanence";
};
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 (value // { inherit hostname; }))
) hosts;
};
}