refactor(security): migrate hardcoded credentials and SSH keys to sops-nix
This commit is contained in:
parent
cbb70ab8bb
commit
ccfa328771
10 changed files with 47 additions and 14 deletions
|
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./secrets.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
homelab = {
|
||||
services.openssh.enable = true;
|
||||
|
|
@ -12,5 +16,10 @@
|
|||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Brussels";
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = ../../secrets/secrets.yaml;
|
||||
age.keyFile = "/var/lib/sops-nix/key.txt";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
18
modules/common/secrets.nix
Normal file
18
modules/common/secrets.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
sops.secrets = {
|
||||
# -- User Public Keys (Anti-Fingerprinting) --
|
||||
"user_keys_admin" = { neededForUsers = true; };
|
||||
"user_keys_deploy" = { neededForUsers = true; };
|
||||
"user_keys_backup" = { neededForUsers = true; };
|
||||
|
||||
# -- Infrastructure Metadata --
|
||||
# Hugo TODO: Populate these in your .sops.yaml / secrets file
|
||||
"acme_email" = {};
|
||||
"cloudflare_dns_token" = {};
|
||||
"pgadmin_email" = {};
|
||||
"gitea_mailer_from" = {};
|
||||
"vaultwarden_smtp_from" = {};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue