sombrero: Add ssh module

This commit is contained in:
Alexander Heldt
2023-10-23 22:16:20 +02:00
parent 1ed731eef4
commit 03a21f464b
2 changed files with 27 additions and 11 deletions

View File

@@ -0,0 +1,26 @@
{ 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 ];
};
};
};
}