From 3abc7fe9733808fdb381f657bd73c7f714a57122 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Sun, 15 Dec 2019 02:37:45 -0700 Subject: [PATCH] users#nrd: init ssh --- secrets/github | Bin 0 -> 1918 bytes secrets/gitlab | Bin 0 -> 1788 bytes users/nrd.nix | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 secrets/github create mode 100644 secrets/gitlab diff --git a/secrets/github b/secrets/github new file mode 100644 index 0000000000000000000000000000000000000000..6f90dc647984f3577f08963e1dd4b04a15c9cf6b GIT binary patch literal 1918 zcmV-^2Z8tiM@dveQdv+`0PYl*H!c;YO(DG1dU7p1f=i9P{qbEfs2iXVCiQB0OR`H< z$dQ2W58IebG_CJ8%?E?3J2Fb|uJ>XLr>aD;kap-{0J4M@3WZxq_1OG-i15-XQWw#V zD^<5Ko4~%biPQ@ZBeOwO>!2JSmqqr$MwH}Z`#-sKghUcCtpFt79BhwHduAv{^|$`t z7Li2*9KKOGlBCcGO}wa9dGr1-AvdeT4#!}bY;&>3cuzqTs*zv5dPI}0nhTn;N6 zPGBrdl>K?+qX1w#9eDrZNU$@4p`u@a%;!9K**pqO+Tq}C0M^o|n$+O_xb`lk#X|Zq zPUI5Z%(TjYyNq!Es&U55A>M-UyD*lVfE?aAJ5U*ZsO375WMvmagO*0oQ@zPfY>ryY z9r5wD`=*fS@>kNX{|A9a+Fega#D+<7QC~+p+%Ab*hrBxCkqG+PXkiTq&~OGHv)XVg zNeDGXn|hHe(K`Wi(up?a;j0N6*oe%MX>O2+g%a1u2?DwqDKy}Qp5dRhcj~jzitK_M z1dV%zC&K`l7?i?Vs|UKo=KGtf(JmttPc(zlXYI&2dGMgj5h@I8fV3k;oOnunv>BAS zW|?+!F~7U>jDR%mE>pv>n?@GA<}+)b&4wfzhr}o2$GS95Oq0xW8fLHP)BaYBfWj_n zR%+fr8fLu;lU9d+8;!SVurp=>IpKaQ;%WgEHpFjR7^@sYW zLlW~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$M2)HWztK&o&IUR3i*z!X(`6N&s0ri0KRk{1hP)`oH*txWV1B_m5NrThs{0 eZ%U6;I)6G=^Poo0Q_iTw&Sy1YjHSomQx8y>wQF4f literal 0 HcmV?d00001 diff --git a/users/nrd.nix b/users/nrd.nix index 3fa4d6d6..633be029 100644 --- a/users/nrd.nix +++ b/users/nrd.nix @@ -1,9 +1,14 @@ { lib, ... }: let + inherit (builtins) + toFile + ; + inherit (lib) fileContents ; + name = "Timothy DeHerrera"; in { @@ -48,6 +53,43 @@ in }; }; + programs.ssh = { + enable = true; + hashKnownHosts = true; + identitiesOnly = true; + + matchBlocks = let + githubKey = toFile "github" + (fileContents ../secrets/github); + + gitlabKey = toFile "gitlab" + (fileContents ../secrets/gitlab); + in + { + github = { + host = "github.com"; + identityFile = githubKey; + extraOptions = { + AddKeysToAgent = "yes"; + }; + }; + gitlab = { + host = "gitlab.com"; + identityFile = gitlabKey; + extraOptions = { + AddKeysToAgent = "yes"; + }; + }; + "gitlab.company" = { + host = "gitlab.company.com"; + identityFile = gitlabKey; + extraOptions = { + AddKeysToAgent = "yes"; + }; + }; + }; + }; + services.gng-agent = { enable = true; defaultCacheTtl = 1800;