Files
nix/hosts/elara/configs/ssh/default.nix
Nikolaos Karaolidis bbe3219985 Add sonder
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-08-16 13:21:47 +03:00

55 lines
1.2 KiB
Nix

{
config,
inputs,
system,
lib,
...
}:
let
selfPkgs = inputs.self.packages.${system};
in
{
sops.secrets = {
"ssh/personal/key" = {
sopsFile = "${inputs.secrets}/domains/personal/secrets.yaml";
key = "ssh/key";
path = "/root/.ssh/ssh_personal_ed25519_key";
};
"ssh/sas/ed25519/key" = {
sopsFile = "${inputs.secrets}/domains/sas/secrets.yaml";
key = "ssh/ed25519/key";
path = "/root/.ssh/ssh_sas_ed25519_key";
};
};
programs.ssh = {
extraConfig = ''
Host karaolidis.com
User git
HostName karaolidis.com
IdentityFile /root/.ssh/ssh_personal_ed25519_key
IdentitiesOnly yes
Host github.sas.com
User git
HostName github.com
IdentityFile /root/.ssh/ssh_sas_ed25519_key
IdentitiesOnly yes
Host gitlab.sas.com
User git
HostName gitlab.sas.com
IdentityFile /root/.ssh/ssh_sas_ed25519_key
IdentitiesOnly yes
'';
knownHostsFiles =
with selfPkgs;
(
[ ssh-known-hosts-github ]
++ lib.lists.optionals config.sas.build.private [ ssh-known-hosts-sas-gitlab ]
);
};
}