From 75b1dd3fbffbd4886d3777ad1cacb7a20f04085b Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 9 Mar 2025 16:38:53 -0700 Subject: [PATCH] feat(nixos/ddclient): Proper secrets management --- modules/nixos/services/ddclient/default.nix | 4 +++- secrets/ddclient.conf.age | Bin 0 -> 1428 bytes secrets/secrets.nix | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 secrets/ddclient.conf.age diff --git a/modules/nixos/services/ddclient/default.nix b/modules/nixos/services/ddclient/default.nix index 61999d7..7946753 100644 --- a/modules/nixos/services/ddclient/default.nix +++ b/modules/nixos/services/ddclient/default.nix @@ -8,10 +8,12 @@ in { options.marleyos.services.ddclient.enable = lib.mkEnableOption "ddclient"; config = lib.mkIf cfg.enable { + age.secrets.ddclient.file = ../../../../secrets/ddclient.conf.age; + services.ddclient = { enable = true; - configFile = "/home/marley/ddclient.conf"; + configFile = config.age.secrets.ddclient.path; }; }; } diff --git a/secrets/ddclient.conf.age b/secrets/ddclient.conf.age new file mode 100644 index 0000000000000000000000000000000000000000..c152598eb7359daa1abda1e8595c3267d63294f0 GIT binary patch literal 1428 zcmZY4{Xf$Q0KoC?C1H|sy?UTDdcI*}&&10%Uo)HeZnm|Fv?sI89&Gj`6|(ANSJ%Ul zdF~Zch&=U3p)Oofkxmct(2MJebW-kI?tZ@e2R`rDhc6NPij_i*Nu4THDg9I$30&_F z@eP4$wMo8WQ2-k4kB72T{iP-XlttzzYJgNwsm7+jG$fG`B;XK6f1XmrlCUXUofxfw zNfE3F`ffHvC(xv@xoEVCBOxV|lNdyOlAc6SM{t#7P$xsHkxIOX4cF?~2;je33<=A? z7@!ecm5#tsa&gE+E}zedMZrxVfvaYLfGIW#nMwxr)L1<{RSUATkTeuEjXfg^z$#Nk-65KkpAg&;+5NTSjh zVls_Fp`eKhy+8w!i5N9Qh{Lg&JV+QD7m2|pYtr@DwsWnY`P; zfzkDmoR~1f|K8+!5ThnQL7iF=jX;PPXd(zl@w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 z-N%9-78)Mmu$?b#)%eT2Y;b)>()9}0Ovk@oH+1X-udWLkSy&8NrX2$&tdAdSU+o#3gBV literal 0 HcmV?d00001 diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 7ca6dd1..a46de88 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -7,6 +7,9 @@ let marleycentre = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEA86DphSL36GsvatkXgFU1ONzt53UzXdUaQN1EBWeCD root@nixos"; marleynet = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIArAAwU4JX7wa5X3Un3q5b+ZD52j0nCnNsGEybWf/7SB root@nixos"; systems = [nyx marleycentre marleynet]; + + defaultKeys = users ++ systems; in { - "babeshare-pass.age".publicKeys = users ++ systems; + "babeshare-pass.age".publicKeys = defaultKeys; + "ddclient.conf.age".publicKeys = defaultKeys; }