mirror of
https://git.oat.zone/dark-firepit/dotfiles
synced 2024-11-26 06:08:48 +01:00
37 lines
675 B
Nix
37 lines
675 B
Nix
{ options, config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
#with lib.my;
|
|
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;
|
|
};
|
|
};
|
|
}
|