blob: 3d1bedb341604dfd56c6b40906ed1976a96e7120 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
{
config,
lib,
pkgs,
username,
...
}:
let
cfg = config.os.core.ssh;
in
{
options.os.core.ssh.enable = lib.mkEnableOption "enables ssh server setup";
config = lib.mkIf cfg.enable {
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
# settings.default-key = "1DCCDC4E78380113E9BBBE413C7DEF329223B701";
pinentryPackage = pkgs.pinentry-curses;
};
users.users = {
${username}.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID5/Mr4PLMDflZ+SoaYP9N3kRbkkh1qL5NLSgW6C7sAu adikro@disroot.org"
];
};
};
}
|