36 lines
967 B
Nix
36 lines
967 B
Nix
{
|
|
description = "Fudo Host Configuration";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-21.05";
|
|
|
|
hosts.url = "path:../fudo-hosts";
|
|
|
|
home-manager.url = "github:nix-community/home-manager/release-21.05";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs = { nixpkgs, hosts, home-manager, ... }: with builtins;
|
|
{
|
|
nixosConfigurations = listToAttrs (map (hostname:
|
|
let
|
|
hostOpts = hosts.host-configs.${hostname};
|
|
pkgs = import nixpkgs { system = hostOpts.arch; };
|
|
|
|
in {
|
|
name = hostname;
|
|
value = pkgs.lib.nixosSystem {
|
|
system = hostOpts.arch;
|
|
modules = [
|
|
(import ./initialize.nix {
|
|
hostname = hostname;
|
|
home-manager-package = home-manager;
|
|
pkgs = pkgs;
|
|
include-secrets = true;
|
|
})
|
|
];
|
|
};
|
|
}) (attrNames hosts.host-configs));
|
|
};
|
|
}
|