add openssh

This commit is contained in:
smayzy 2025-08-09 13:19:45 +02:00
parent cacd136ca9
commit fec9e18710
3 changed files with 32 additions and 0 deletions

View File

@ -16,6 +16,7 @@
./groups ./groups
./hardware ./hardware
./ide ./ide
./networking
./notif ./notif
./office ./office
./rice ./rice

View File

@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./openssh.nix
];
}

View File

@ -0,0 +1,25 @@
{ lib, config, ... }:
let
inherit (lib) mkIf mkOption types;
in
{
options.smayzy.openssh.enable = mkOption {
type = types.bool;
default = false;
description = "openssh";
};
config = mkIf config.smayzy.openssh.enable {
services.openssh = {
enable = true;
ports = [ 22 ];
settings = {
PasswordAuthentication = true;
AllowUsers = null;
UseDns = true;
X11Forwarding = false;
PermitRootLogin = "no";
};
};
};
}