2021-09-07 15:39:45 -07:00
|
|
|
{ hostname, home-manager-module, pkgs, include-secrets ? true, ... }:
|
2021-02-25 12:45:50 -08:00
|
|
|
|
2021-04-07 14:03:52 -07:00
|
|
|
let
|
2021-09-07 15:39:45 -07:00
|
|
|
# Get info on this host so we know what to load
|
2021-04-07 14:03:52 -07:00
|
|
|
host-config = import (./. + "/config/hosts/${hostname}.nix");
|
|
|
|
|
2021-09-07 15:39:45 -07:00
|
|
|
in {
|
2021-02-25 12:45:50 -08:00
|
|
|
imports = [
|
|
|
|
./lib
|
|
|
|
./config
|
2021-09-04 14:17:51 -07:00
|
|
|
|
2021-09-07 15:39:45 -07:00
|
|
|
home-manager-module
|
|
|
|
|
2021-02-25 12:45:50 -08:00
|
|
|
(./. + "/config/hardware/${hostname}.nix")
|
2021-04-07 14:03:52 -07:00
|
|
|
(./. + "/config/host-config/${hostname}.nix")
|
|
|
|
(./. + "/config/profile-config/${host-config.profile}.nix")
|
|
|
|
(./. + "/config/domain-config/${host-config.domain}.nix")
|
|
|
|
(./. + "/config/site-config/${host-config.site}.nix")
|
2021-02-25 12:45:50 -08:00
|
|
|
];
|
2021-02-26 07:30:38 -08:00
|
|
|
|
2021-02-25 12:45:50 -08:00
|
|
|
config = {
|
2021-02-26 07:30:38 -08:00
|
|
|
instance = { hostname = hostname; };
|
2021-07-20 18:28:12 -07:00
|
|
|
|
2021-09-07 15:39:45 -07:00
|
|
|
nixpkgs.pkgs = pkgs;
|
|
|
|
|
2021-07-20 18:28:12 -07:00
|
|
|
fudo.secrets.enable = include-secrets;
|
2021-02-25 12:45:50 -08:00
|
|
|
};
|
2021-02-26 07:30:38 -08:00
|
|
|
}
|