mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-24 07:34:15 -05:00
working on provisioning secrets for hosts
This commit is contained in:
parent
ee0a312cfa
commit
455d1973f7
4 changed files with 44 additions and 6 deletions
|
|
@ -5,5 +5,6 @@
|
|||
}: {
|
||||
imports = [
|
||||
./user.nix
|
||||
./secrets.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
35
modules/users/crow/secrets.nix
Normal file
35
modules/users/crow/secrets.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.user.crow.enable {
|
||||
sops = {
|
||||
defaultSopsFile = inputs.nix-secrets.secrets.parzival;
|
||||
age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
age.generateKey = true;
|
||||
};
|
||||
|
||||
#######
|
||||
# AWS #
|
||||
#######
|
||||
|
||||
sops.secrets."aws/wce/access_key" = {};
|
||||
sops.secrets."aws/wce/secret_key" = {};
|
||||
sops.secrets."aws/work/access_key" = {};
|
||||
sops.secrets."aws/work/secret_key" = {};
|
||||
|
||||
sops.templates."aws_shared_config" = {
|
||||
owner = config.users.users.crow.name;
|
||||
content = ''
|
||||
[default]
|
||||
aws_access_key_id=${config.sops.placeholder."aws/work/access_key"}
|
||||
aws_secret_access_key=${config.sops.placeholder."aws/work/secret_key"}
|
||||
|
||||
[wce]
|
||||
aws_access_key_id=${config.sops.placeholder."aws/wce/access_key"}
|
||||
aws_secret_access_key=${config.sops.placeholder."aws/wce/secret_key"}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue