network/nix/nixos-module/default.nix

20 lines
333 B
Nix

{ config, lib, ... }:
let
inherit (config.networking) hostName;
inherit (lib) optional;
hostConfig = config.site.hosts.${hostName};
in
{
imports = [
./defaults.nix
]
++ optional (hostConfig.role == "server") [
./lxc-containers.nix
]
++ optional (hostConfig.role == "container") [
./container.nix
];
}