From 61f3db56410f41d5249c88e44db60d9713dae26d Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Tue, 3 Dec 2024 21:19:39 -0600 Subject: home: big refactor --- home/environ/ssh.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 home/environ/ssh.nix (limited to 'home/environ/ssh.nix') diff --git a/home/environ/ssh.nix b/home/environ/ssh.nix new file mode 100644 index 0000000..29829be --- /dev/null +++ b/home/environ/ssh.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: +with lib; let + cfg = config.local.environ; +in +{ + config = mkIf cfg.enable { + programs.ssh = { + enable = true; + + compression = true; + controlMaster = "autoask"; + controlPath = "/run/user/%i/ssh/master-%r@%n:%p"; + + extraOptionOverrides.AddKeysToAgent = "true"; + + matchBlocks = import ./ssh-match.nix; + }; + + systemd.user.tmpfiles.rules = [ + "d %t/ssh 0700" + ]; + }; +} -- cgit v1.2.3