2021-03-22 22:38:15 +01:00
|
|
|
{ hostName, config, lib, pkgs, ... }:
|
2021-03-19 22:55:48 +01:00
|
|
|
|
|
|
|
let
|
2021-03-22 22:38:15 +01:00
|
|
|
inherit (lib) optionals;
|
2021-03-19 22:55:48 +01:00
|
|
|
|
2021-03-22 20:25:50 +01:00
|
|
|
hostConfig = lib.config.site.hosts.${hostName};
|
|
|
|
in {
|
2021-03-22 22:38:15 +01:00
|
|
|
site = lib.config.site;
|
|
|
|
|
2021-03-19 22:55:48 +01:00
|
|
|
imports = [
|
2021-03-20 02:34:13 +01:00
|
|
|
../lib/config/options.nix
|
2021-03-24 01:20:30 +01:00
|
|
|
./defaults.nix
|
2021-03-22 22:38:15 +01:00
|
|
|
]
|
|
|
|
++ optionals (hostConfig.role == "server") [
|
2021-03-24 01:20:30 +01:00
|
|
|
./server/lxc-containers.nix
|
2021-03-24 22:23:09 +01:00
|
|
|
./server/network.nix
|
2021-03-22 22:38:15 +01:00
|
|
|
]
|
|
|
|
++ optionals (hostConfig.role == "container") [
|
2021-03-24 01:20:30 +01:00
|
|
|
./container/defaults.nix
|
2021-03-19 22:55:48 +01:00
|
|
|
];
|
|
|
|
}
|