diff options
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" + ]; + }; }; } |
