summaryrefslogtreecommitdiff
path: root/os/core/ssh.nix
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2025-12-26 21:19:02 +0100
committeradikro <adikro@disroot.org>2025-12-26 21:19:02 +0100
commitdb44d490d1b6e25212a5bd7cd0f3a390cf394b55 (patch)
tree4144bbd6af8216da847c44dba30aed418e71c371 /os/core/ssh.nix
parenta6e1c4deec2bc9381159ea9231f4e8a8a8a6c703 (diff)
added ssh support, renamed sys to os
Diffstat (limited to 'os/core/ssh.nix')
-rw-r--r--os/core/ssh.nix27
1 files changed, 27 insertions, 0 deletions
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 ];
+ };
+ };
+}