whole entire revamp

This commit is contained in:
Reid 2023-08-22 21:49:15 -07:00
parent 7b3e28f66d
commit 1c86119fbb
21 changed files with 652 additions and 272 deletions

35
modules/services/ssh.nix Normal file
View file

@ -0,0 +1,35 @@
{ options, config, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.services.ssh;
in {
options.modules.services.ssh = {
enable = mkOption {
type = types.bool;
default = false;
description = "Provide system SSH support though OpenSSH.";
};
requirePassword = mkOption {
type = types.bool;
default = true;
};
};
config = mkIf cfg.enable {
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = cfg.requirePassword;
PermitRootLogin = "no";
};
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
}