From a5be4ddbb2467e8bc9bfc75a937723ac6e2cff3f Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Thu, 21 Nov 2024 21:10:24 +0100 Subject: [PATCH] Add sops secrets file per user --- .sops.yaml | 4 ++-- machines/gamepc/configuration.nix | 2 +- machines/gamepc/{home.sops.yaml => pim.sops.yaml} | 0 machines/sue/configuration.nix | 2 +- machines/sue/pim.home.nix | 2 +- machines/sue/{home.sops.yaml => pim.sops.yaml} | 0 6 files changed, 5 insertions(+), 5 deletions(-) rename machines/gamepc/{home.sops.yaml => pim.sops.yaml} (100%) rename machines/sue/{home.sops.yaml => pim.sops.yaml} (100%) diff --git a/.sops.yaml b/.sops.yaml index 791d154..c92ef52 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -10,7 +10,7 @@ creation_rules: key_groups: - age: - *sue_root - - path_regex: machines/sue/home.sops.yaml + - path_regex: machines/sue/pim.sops.yaml key_groups: - age: - *sue_pim @@ -21,7 +21,7 @@ creation_rules: - *sue_pim - *sue_root - *gamepc_root - - path_regex: machines/gamepc/home.sops.yaml + - path_regex: machines/gamepc/pim.sops.yaml key_groups: - age: - *sue_pim diff --git a/machines/gamepc/configuration.nix b/machines/gamepc/configuration.nix index f4bcf0d..c291861 100644 --- a/machines/gamepc/configuration.nix +++ b/machines/gamepc/configuration.nix @@ -39,7 +39,7 @@ in { }; pim-sops-age-key = { - keyCommand = ["sudo" sops "--extract" "[\"sops_age_key\"]" "-d" "${self}/machines/gamepc/home.sops.yaml"]; + keyCommand = ["sudo" sops "--extract" "[\"sops_age_key\"]" "-d" "${self}/machines/gamepc/pim.sops.yaml"]; name = "keys.txt"; destDir = "/home/pim/.config/sops/age"; user = "pim"; diff --git a/machines/gamepc/home.sops.yaml b/machines/gamepc/pim.sops.yaml similarity index 100% rename from machines/gamepc/home.sops.yaml rename to machines/gamepc/pim.sops.yaml diff --git a/machines/sue/configuration.nix b/machines/sue/configuration.nix index 1817619..63c4919 100644 --- a/machines/sue/configuration.nix +++ b/machines/sue/configuration.nix @@ -35,7 +35,7 @@ in { }; pim-sops-age-key = { - keyCommand = ["sudo" sops "--extract" "[\"sops_age_key\"]" "-d" "${self}/machines/sue/home.sops.yaml"]; + keyCommand = ["sudo" sops "--extract" "[\"sops_age_key\"]" "-d" "${self}/machines/sue/pim.sops.yaml"]; name = "keys.txt"; destDir = "/home/pim/.config/sops/age"; user = "pim"; diff --git a/machines/sue/pim.home.nix b/machines/sue/pim.home.nix index cc8ec71..966edf4 100644 --- a/machines/sue/pim.home.nix +++ b/machines/sue/pim.home.nix @@ -22,7 +22,7 @@ }; sops = { - defaultSopsFile = ./home.sops.yaml; + defaultSopsFile = ./pim.sops.yaml; age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt"; secrets."keepassxc".path = "${config.xdg.configHome}/keepassxc/keepassxc.ini"; }; diff --git a/machines/sue/home.sops.yaml b/machines/sue/pim.sops.yaml similarity index 100% rename from machines/sue/home.sops.yaml rename to machines/sue/pim.sops.yaml