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:
parent
8d13626351
commit
fb055f309d
2 changed files with 12 additions and 3 deletions
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue