refactor: mkHost load-all infrastructure and convert simple features

This commit is contained in:
2026-04-12 21:27:43 +00:00
parent 3ff4583017
commit 6770bc76a2
18 changed files with 455 additions and 210 deletions

View File

@@ -1,18 +1,23 @@
{
nixos =
{ lib, config, ... }:
let
cfg = config.features.openssh;
in
{
options = {
openssh.port = lib.mkOption {
options.features.openssh = {
enable = lib.mkEnableOption "openssh";
port = lib.mkOption {
type = lib.types.port;
default = 22;
};
};
config = {
config = lib.mkIf cfg.enable {
services.openssh = {
enable = true;
ports = [ config.openssh.port ];
ports = [ cfg.port ];
settings = {
PasswordAuthentication = false;
AllowUsers = null;