moved over a load more modules

This commit is contained in:
Chris Kruining 2025-07-23 23:56:56 +02:00 committed by Chris Kruining
parent a9a4777168
commit 423e99886d
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
34 changed files with 226 additions and 578 deletions

View file

@ -0,0 +1,28 @@
{ config, lib, namespace, ... }:
let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.${namespace}.services.networking.ssh;
in
{
options.${namespace}.services.networking.ssh = {
enable = mkEnableOption "enable ssh";
};
config = mkIf cfg.enable {
services.openssh = {
enable = true;
openFirewall = true;
ports = [ 22 ];
settings = {
PasswordAuthentication = true;
AllowUsers = [ "chris" "root" ];
UseDns = true;
UsePAM = true;
PermitRootLogin = "prohibit-password";
PermitEmptyPasswords = "no";
};
};
};
}