2021-03-19 22:55:48 +01:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (config.networking) hostName;
|
|
|
|
inherit (lib) optional;
|
|
|
|
|
2021-03-20 00:06:31 +01:00
|
|
|
hostConfig = config.site.hosts.${hostName};
|
2021-03-19 22:55:48 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./defaults.nix
|
|
|
|
]
|
2021-03-20 00:06:31 +01:00
|
|
|
++ optional (hostConfig.role == "server") [
|
2021-03-19 22:55:48 +01:00
|
|
|
./lxc-containers.nix
|
|
|
|
]
|
2021-03-20 00:06:31 +01:00
|
|
|
++ optional (hostConfig.role == "container") [
|
2021-03-19 22:55:48 +01:00
|
|
|
./container.nix
|
|
|
|
];
|
|
|
|
}
|