network/nix/nixos-module/default.nix

22 lines
414 B
Nix
Raw Normal View History

{ hostName, config, lib, pkgs, ... }:
2021-03-19 22:55:48 +01:00
let
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 {
site = lib.config.site;
2021-03-19 22:55:48 +01:00
imports = [
../lib/config/options.nix
2021-03-24 01:20:30 +01:00
./defaults.nix
]
++ optionals (hostConfig.role == "server") [
2021-03-24 01:20:30 +01:00
./server/lxc-containers.nix
./server/network.nix
]
++ optionals (hostConfig.role == "container") [
2021-03-24 01:20:30 +01:00
./container/defaults.nix
2021-03-19 22:55:48 +01:00
];
}