nixos-configuration/modules/server.nix
2024-02-09 18:52:40 +01:00

21 lines
284 B
Nix

{
config,
pkgs,
lib,
...
}: let
cfg = config.my.server;
in {
options.my.server = {
enable = lib.mkEnableOption "server role";
};
config = lib.mkIf cfg.enable {
networking.firewall = {
enable = true;
allowedTCPPortRanges = [
];
};
};
}