From ea3bc019f620cdd9149c4b7def098deb54de0322 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Wed, 9 Jul 2025 17:56:45 +0200 Subject: [PATCH] Home: Generate .sops.yaml --- home/christoph/default.nix | 11 +++++++++++ system/modules/sops-nix/sops.yaml | 7 ------- 2 files changed, 11 insertions(+), 7 deletions(-) delete mode 100644 system/modules/sops-nix/sops.yaml diff --git a/home/christoph/default.nix b/home/christoph/default.nix index 135f9efa..2b5c78bf 100644 --- a/home/christoph/default.nix +++ b/home/christoph/default.nix @@ -301,6 +301,17 @@ { ".ssh/id_ed25519.pub".text = "${publicKeys.${username}.ssh}"; ".secrets/age/age.pub".text = "${publicKeys.${username}.age}"; + + # The sops config specifies what happens when we call sops edit + ".sops.yaml".text = '' + keys: + - &${username} ${publicKeys.${username}.age} + creation_rules: + - path_regex: secrets.yaml$ + key_groups: + - age: + - *${username} + ''; } (lib.mkIf nixosConfig.modules.desktopportal.termfilechooser.enable { ".config/xdg-desktop-portal-termfilechooser/config".text = '' diff --git a/system/modules/sops-nix/sops.yaml b/system/modules/sops-nix/sops.yaml deleted file mode 100644 index 4973678a..00000000 --- a/system/modules/sops-nix/sops.yaml +++ /dev/null @@ -1,7 +0,0 @@ -keys: - - &christoph age14ph8vrj657e7s35d60xehzuq46t9zd6pzcm6pw4jragzrvf6xs9s77usnm -creation_rules: - - path_regex: secrets.yaml$ - key_groups: - - age: - - *christoph