network/nix/nixos-module/default.nix

21 lines
373 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 = [
./defaults.nix
../lib/config/options.nix
]
++ optionals (hostConfig.role == "server") [
2021-03-22 23:37:25 +01:00
./lxc-containers.nix
]
++ optionals (hostConfig.role == "container") [
./container.nix
2021-03-19 22:55:48 +01:00
];
}