Server: migrate secrets to sops

This commit is contained in:
Toast 2025-12-08 17:51:55 +01:00
parent 859a4b20a5
commit b668212daf
5 changed files with 35 additions and 63 deletions

View file

@ -1,12 +1,6 @@
{
config,
flakeSelf,
...
}: let
hostSecrets = "${flakeSelf.inputs.secrets}/" + config.networking.hostName;
in {
{config, ...}: {
# Set up secrets
age.secrets = {ddclient-passwd.file = hostSecrets + "/ddclient-password.age";};
sops.secrets.ddclientPassword = {};
services.ddclient = {
enable = true;
@ -15,7 +9,7 @@ in {
protocol = "namecheap";
server = "dynamicdns.park-your-domain.com";
username = "toast003.xyz";
passwordFile = config.age.secrets.ddclient-passwd.path;
passwordFile = config.sops.secrets.ddclientPassword.path;
domains = ["@"];
};
}