nixos-configuration/modules/server/default.nix

34 lines
444 B
Nix
Raw Normal View History

2023-09-10 14:12:01 +02:00
{
config,
pkgs,
lib,
...
}: let
cfg = config.my.server;
in {
imports = [];
options.my.server = {
enable = lib.mkEnableOption "server role";
};
config = lib.mkIf cfg.enable {
services = {
services.openssh.enable = true;
};
programs = {
};
networking.firewall = {
allowedTCPPortRanges = [
{
# ssh
from = 22;
to = 22;
}
];
};
};
}