1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2024-12-14 11:57:52 +00:00

{darwin,home-manager}: add example template

This commit is contained in:
Jörg Thalheim 2024-12-02 09:22:56 +01:00 committed by Jörg Thalheim
parent 8d13626351
commit fb055f309d
2 changed files with 12 additions and 3 deletions

View file

@ -1,10 +1,16 @@
{
config,
...
}:
{ {
imports = [ imports = [
../modules/nix-darwin/default.nix ../modules/nix-darwin/default.nix
]; ];
documentation.enable = false; documentation.enable = false;
sops.secrets.test_key = { }; sops.secrets.test_key = { };
sops.templates."template.toml".content = ''
password = "${config.sops.placeholder.test_key}";
'';
sops.defaultSopsFile = ../pkgs/sops-install-secrets/test-assets/secrets.yaml; sops.defaultSopsFile = ../pkgs/sops-install-secrets/test-assets/secrets.yaml;
sops.age.generateKey = true; sops.age.generateKey = true;
system.stateVersion = 5; system.stateVersion = 5;

View file

@ -1,5 +1,5 @@
{ config, ... }:
{ config, ... }: { {
imports = [ imports = [
../modules/home-manager/sops.nix ../modules/home-manager/sops.nix
]; ];
@ -11,5 +11,8 @@
sops.age.generateKey = true; sops.age.generateKey = true;
sops.age.keyFile = "${config.home.homeDirectory}/.age-key.txt"; sops.age.keyFile = "${config.home.homeDirectory}/.age-key.txt";
sops.secrets.test_key = { }; sops.secrets.test_key = { };
sops.templates."template.toml".content = ''
password = "${config.sops.placeholder.test_key}";
'';
sops.defaultSopsFile = ../pkgs/sops-install-secrets/test-assets/secrets.yaml; sops.defaultSopsFile = ../pkgs/sops-install-secrets/test-assets/secrets.yaml;
} }