diff options
Diffstat (limited to 'home/environ/ssh.nix')
| -rw-r--r-- | home/environ/ssh.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/home/environ/ssh.nix b/home/environ/ssh.nix new file mode 100644 index 0000000..d363baf --- /dev/null +++ b/home/environ/ssh.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.local.environ; +in { + config = mkIf cfg.enable { + programs.ssh = { + enable = true; + + compression = true; + controlMaster = "auto"; + 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" + ]; + }; +} |
