From 7e5f276e2a4243c841630f696c7e77d9a937060e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=B6ger?= Date: Wed, 17 Apr 2024 20:52:51 +0200 Subject: [PATCH] 29 current 2024-04-17 20:47:36 23.11.20240405.72da83d 6.1.84 * --- home/jonas/ssh.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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); }