nixos-configuration/modules/server.nix
2023-09-24 14:56:07 +02:00

26 lines
370 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 = [
# {
# # ssh
# from = 22;
# to = 22;
# }
];
};
};
}