From 1bbd4e19c5595e6a6c310bd36fac5b4bd97ff39f Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 16 Dec 2024 09:25:23 -0800 Subject: refactor home-manager Only install what's needed for specific OSes. --- nix/users/fcuny/ssh.nix | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 nix/users/fcuny/ssh.nix (limited to 'nix/users/fcuny/ssh.nix') diff --git a/nix/users/fcuny/ssh.nix b/nix/users/fcuny/ssh.nix new file mode 100644 index 0000000..17c2f03 --- /dev/null +++ b/nix/users/fcuny/ssh.nix @@ -0,0 +1,38 @@ +{ ... }: { + # https://github.com/nix-community/home-manager/blob/master/modules/programs/ssh.nix + programs.ssh = { + enable = true; + forwardAgent = true; + serverAliveInterval = 60; + controlMaster = "auto"; + controlPersist = "30m"; + + matchBlocks = { + "personal" = { + hostname = "github.com"; + user = "git"; + forwardAgent = false; + extraOptions = { preferredAuthentications = "publickey"; }; + }; + "github.com" = { + hostname = "github.com"; + user = "git"; + forwardAgent = false; + extraOptions = { preferredAuthentications = "publickey"; }; + }; + "github.rbx.com" = { + hostname = "github.rbx.com"; + user = "git"; + forwardAgent = false; + extraOptions = { preferredAuthentications = "publickey"; }; + }; + "git" = { + hostname = "git.fcuny.net"; + port = 422; + user = "git"; + forwardAgent = false; + extraOptions = { preferredAuthentications = "publickey"; }; + }; + }; + }; +} -- cgit 1.4.1