diff options
| author | adikro <adikro@disroot.org> | 2026-03-01 19:57:16 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-03-01 19:57:16 +0100 |
| commit | 1be09af058424219de2aad4b9cc27ccf760d23f6 (patch) | |
| tree | bdc1177b166e1eef36763984b6862d7755a7bde8 /os/core/ssh.nix | |
| parent | 4b41ce640c5eddcb50904331e03aac5460caa144 (diff) | |
...
Diffstat (limited to 'os/core/ssh.nix')
| -rw-r--r-- | os/core/ssh.nix | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/os/core/ssh.nix b/os/core/ssh.nix index 4069d31..d41c116 100644 --- a/os/core/ssh.nix +++ b/os/core/ssh.nix @@ -10,21 +10,32 @@ let in { options.os.core.ssh.enable = lib.mkEnableOption "enables ssh server setup"; + config = lib.mkIf cfg.enable { + environment.systemPackages = [ pkgs.rclone ]; services.tailscale = { enable = true; openFirewall = true; }; - services.openssh.enable = true; + services.openssh = { + enable = true; + settings = { + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + }; + }; programs.gnupg.agent = { enable = true; enableSSHSupport = true; pinentryPackage = pkgs.pinentry-curses; }; - users.users.${username}.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID5/Mr4PLMDflZ+SoaYP9N3kRbkkh1qL5NLSgW6C7sAu adikro@disroot.org" - ]; + + users.users = { + ${username}.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID5/Mr4PLMDflZ+SoaYP9N3kRbkkh1qL5NLSgW6C7sAu adikro@disroot.org" + ]; + }; }; } |
