23 lines
432 B
Nix
23 lines
432 B
Nix
{ hostName, config, lib, pkgs, ... }:
|
|
|
|
let
|
|
inherit (lib) optionals;
|
|
|
|
hostConfig = lib.config.site.hosts.${hostName};
|
|
in {
|
|
site = lib.config.site;
|
|
|
|
imports = [
|
|
../lib/config/options.nix
|
|
./defaults.nix
|
|
./network.nix
|
|
]
|
|
++ optionals (hostConfig.role == "server") [
|
|
./server/lxc-containers.nix
|
|
./server/network.nix
|
|
]
|
|
++ optionals (hostConfig.role == "container") [
|
|
./container/defaults.nix
|
|
];
|
|
}
|