From 1be09af058424219de2aad4b9cc27ccf760d23f6 Mon Sep 17 00:00:00 2001 From: adikro Date: Sun, 1 Mar 2026 19:57:16 +0100 Subject: ... --- os/core/ssh.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'os/core/ssh.nix') 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" + ]; + }; }; } -- cgit v1.3