diff --git a/home/jonas/ssh.nix b/home/jonas/ssh.nix index 7a622c2..cebd979 100644 --- a/home/jonas/ssh.nix +++ b/home/jonas/ssh.nix @@ -2,10 +2,25 @@ config, pkgs, ... -}: rec { +}: let + sshKeys = name: { + sops.secrets."ssh/id_rsa_${name}.pub" = { + sopsFile = ../../secrets/jonas/ssh.yaml; + key = "keys/${name}/pub"; + path = "${config.home.homeDirectory}/.ssh/id_rsa_${name}.pub"; + }; + sops.secrets."ssh/id_rsa_${name}" = { + sopsFile = ../../secrets/jonas/ssh.yaml; + key = "keys/${name}/priv"; + path = "${config.home.homeDirectory}/.ssh/id_rsa_${name}"; + }; + }; +in { sops.secrets."ssh/config" = { sopsFile = ../../secrets/jonas/ssh.yaml; key = "config"; path = "${config.home.homeDirectory}/.ssh/config"; }; + inherit (sshKeys passgit); + inherit (sshKeys borg); }