From a422cff8f8282ff4f3c462f818dbcf5d80e6d166 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 4 Mar 2022 07:05:54 -0800 Subject: ssh: new module, and load it for my user --- users/fcuny/cli/default.nix | 3 ++- users/fcuny/cli/ssh.nix | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 users/fcuny/cli/ssh.nix (limited to 'users/fcuny') diff --git a/users/fcuny/cli/default.nix b/users/fcuny/cli/default.nix index 07eb211..093686e 100644 --- a/users/fcuny/cli/default.nix +++ b/users/fcuny/cli/default.nix @@ -1,7 +1,8 @@ { config, lib, pkgs, ... }: { - imports = [ ./backups.nix ./git.nix ./tmux.nix ./yt-dlp.nix ./zsh.nix ]; + imports = + [ ./backups.nix ./git.nix ./ssh.nix ./tmux.nix ./yt-dlp.nix ./zsh.nix ]; home.packages = [ pkgs.gcc pkgs.gnumake pkgs.jq pkgs.ripgrep ]; } diff --git a/users/fcuny/cli/ssh.nix b/users/fcuny/cli/ssh.nix new file mode 100644 index 0000000..9708660 --- /dev/null +++ b/users/fcuny/cli/ssh.nix @@ -0,0 +1,17 @@ +{ + programs.ssh = { + enable = true; + forwardAgent = true; + serverAliveInterval = 60; + controlMaster = "auto"; + controlPersist = "30m"; + matchBlocks = { + "github.com" = { + hostname = "github.com"; + user = "git"; + forwardAgent = false; + extraOptions = { preferredAuthentications = "publickey"; }; + }; + }; + }; +} -- cgit 1.4.1