Switch to using a common hostconfig at build and config time.

This commit is contained in:
Root
2021-04-07 14:03:52 -07:00
parent d835ae3e75
commit 418c04170c
40 changed files with 1015 additions and 888 deletions
+9 -12
View File
@@ -1,27 +1,24 @@
{ hostname, profile, domain, site, home-manager-package, pkgs, ... }:
{ hostname, home-manager-package, pkgs, ... }:
{
let
host-config = import (./. + "/config/hosts/${hostname}.nix");
in {
imports = [
./lib
./config
./packages
(./. + "/config/hardware/${hostname}.nix")
(./. + "/config/hosts/${hostname}.nix")
(./. + "/config/profiles/${profile}.nix")
(./. + "/config/domains/${domain}.nix")
(./. + "/config/sites/${site}.nix")
(./. + "/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")
(import "${home-manager-package}/nixos")
];
config = {
instance = { hostname = hostname; };
fudo.hosts."${hostname}" = {
domain = domain;
site = site;
profile = profile;
};
};
}