From db44d490d1b6e25212a5bd7cd0f3a390cf394b55 Mon Sep 17 00:00:00 2001 From: adikro Date: Fri, 26 Dec 2025 21:19:02 +0100 Subject: added ssh support, renamed sys to os --- os/core/ssh.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 os/core/ssh.nix (limited to 'os/core/ssh.nix') diff --git a/os/core/ssh.nix b/os/core/ssh.nix new file mode 100644 index 0000000..032bb44 --- /dev/null +++ b/os/core/ssh.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.os.core.ssh; +in +{ + options.os.core.ssh.enable = lib.mkEnableOption "enables ssh server setup"; + config = lib.mkIf cfg.enable { + services.tailscale.enable = true; + + services.openssh = { + enable = true; + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + }; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + pinentryPackage = pkgs.pinentry-curses; + }; + + networking.firewall = { + trustedInterfaces = [ "tailscale0" ]; + allowedUDPPorts = [ 41641 ]; + }; + }; +} -- cgit v1.3