Files
nixos-configs/hosts/sombrero/modules/ssh/default.nix
2023-10-26 22:08:20 +02:00

27 lines
392 B
Nix

{ lib, config, ... }:
let
enabled = config.mod.ssh.enable;
in
{
options = {
mod.ssh = {
enable = lib.mkEnableOption "enable ssh module";
};
};
config = lib.mkIf enabled {
services = {
openssh = {
enable = true;
ports = [ 1122 ];
};
};
networking = {
firewall = {
allowedTCPPorts = [ 1122 ];
};
};
};
}