Add declarative ssh known hosts
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
{ ... }:
|
||||
{ inputs, system, ... }:
|
||||
let
|
||||
selfPkgs = inputs.self.packages.${system};
|
||||
in
|
||||
{
|
||||
sops.secrets."ssh/sas/key" = {
|
||||
sopsFile = ../../../../secrets/sas/secrets.yaml;
|
||||
@@ -6,15 +9,22 @@
|
||||
path = "/root/.ssh/ssh_sas_ed25519_key";
|
||||
};
|
||||
|
||||
programs.ssh.extraConfig = ''
|
||||
Host github.com
|
||||
User git
|
||||
HostName github.com
|
||||
IdentityFile /root/.ssh/ssh_sas_ed25519_key
|
||||
programs.ssh = {
|
||||
extraConfig = ''
|
||||
Host github.com
|
||||
User git
|
||||
HostName github.com
|
||||
IdentityFile /root/.ssh/ssh_sas_ed25519_key
|
||||
|
||||
Host gitlab.sas.com
|
||||
User git
|
||||
HostName gitlab.sas.com
|
||||
IdentityFile /root/.ssh/ssh_sas_ed25519_key
|
||||
'';
|
||||
Host gitlab.sas.com
|
||||
User git
|
||||
HostName gitlab.sas.com
|
||||
IdentityFile /root/.ssh/ssh_sas_ed25519_key
|
||||
'';
|
||||
|
||||
knownHostsFiles = with selfPkgs; [
|
||||
ssh-known-hosts-github
|
||||
ssh-known-hosts-sas-gitlab
|
||||
];
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user