whole entire revamp
This commit is contained in:
parent
7b3e28f66d
commit
1c86119fbb
21 changed files with 652 additions and 272 deletions
35
modules/services/ssh.nix
Normal file
35
modules/services/ssh.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue