added ssh

This commit is contained in:
2025-04-25 08:41:34 +02:00
parent 68ec429e96
commit 2bd950bd83
4 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.settings.services.ssh;
in {
options = {
settings.services.ssh.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable ssh service
'';
default = false;
};
};
config = mkIf cfg.enable {
services.openssh = {
enable = true;
ports = [ 22 ];
};
networking.firewall.allowedTCPPorts = [ 22 ];
};
}