users#nrd: init ssh
This commit is contained in:
parent
4122c25ac0
commit
3abc7fe973
BIN
secrets/github
Normal file
BIN
secrets/github
Normal file
Binary file not shown.
BIN
secrets/gitlab
Normal file
BIN
secrets/gitlab
Normal file
Binary file not shown.
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user