Switch to using a common hostconfig at build and config time.
This commit is contained in:
+9
-12
@@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user