From 88a65597a5d0f0dc54e1334f4003fa628c693370 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Tue, 25 Jun 2024 21:47:48 -0400 Subject: [PATCH] mauville: setup ddclient --- hosts/mauville/default.nix | 19 +++++++++++++++++++ secrets/cloudflare.age | Bin 0 -> 1243 bytes secrets/secrets.nix | 1 + 3 files changed, 20 insertions(+) create mode 100644 secrets/cloudflare.age diff --git a/hosts/mauville/default.nix b/hosts/mauville/default.nix index daf2bc3b..b7ff7236 100644 --- a/hosts/mauville/default.nix +++ b/hosts/mauville/default.nix @@ -19,6 +19,8 @@ in { ./home.nix ]; + age.secrets.cloudflare.file = ../../secrets/cloudflare.age; + boot.loader = { efi.canTouchEfiVariables = true; systemd-boot.enable = true; @@ -57,6 +59,23 @@ in { }; services = { + ddclient = { + enable = true; + domains = [ + "music.raffauflabs.com" + "plex.raffauflabs.com" + "podcasts.raffauflabs.com" + "raffauflabs.com" + ]; + interval = "10min"; + passwordFile = config.age.secrets.cloudflare.path; + protocol = "cloudflare"; + ssl = true; + use = "web, web=dynamicdns.park-your-domain.com/getip, web-skip='Current IP Address: '"; + username = "token"; + zone = "raffauflabs.com"; + }; + fail2ban.enable = true; nginx = { diff --git a/secrets/cloudflare.age b/secrets/cloudflare.age new file mode 100644 index 0000000000000000000000000000000000000000..d1866799dea1df1d1e872f80b39d497725ab9394 GIT binary patch literal 1243 zcmZ9_JIm{2007{FZUOZNC>TK$DWADDO|u-$y-Aa_Nt3>51~E-@`*OdhK?Da!CpRZS zM;AdsI1XoUIJkUroK$di@E15J?tT8i<3+(;Q25QY>XNc}w`?M0z@WRwaNEXr!38Ht zjD{yUIOztAF*^Z87+x+l?Y!;qla~c2zq;a0YO0-|2OhqY$BIJ`oosa147A?HWiQu`c6EftqtB+&2ya!j4OV&--Str73 zcUA@z&l)qS#b+BrKtdtZbZ*nO%6U*T%P@1Lfd@dfNL_ENb=P z>qaO{_)4Wnx?hxA9qA^gl6f9OM~lO&1rjHO6J+xURkbDiBE6vwj%WErO%}eO6G^OQ z`GIrf)plS5r)96v!nobQ+#<&j4i>qg_Z%JL@|2Gh7Y~ByOIWF8Tau_lLQu3e<`1Em zETLsDA+O^K z=x(ZcvRy1aDp8#ZQ<@8xTqL4eC1wldLON~A*yU{2VJFin0Pl6&S(aGCS;uqE;H-Qe zRyc`{x7)!oNRxqU`mnEEnvHrvxN2U^DHhS;>HK-}(BuPnuncub3Dh zj-7$y)azJb_1mE z)e(F)YgANYTwNRb5ah0Rsk6=1ky!LVFtW8BPM+Cw$BTxekRfa$aoMAx9WVK7FDUD| z+LDSJimfKfT}W2$JRMA#50@j3~B?;oTcYV zZaUb_MPHt1WqV&+m_aA$ zUS;Q=Zxp@4L{xz8?(Sffi~7^4OX{6ftqR$23C#6#ZL^rVU3n$|E6_kOU36wp==Tp_ z`{&6M=*@Tj{J8mAedF}>qlae?-&|h)VE6jJ?|=2y(_cR4e|z!Kx1W6X#b+-)M~q(| g{qg00k3W6;hgTn-{q*zmzhC&?c;&sn(tP^yf7w!(egFUf literal 0 HcmV?d00001 diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 9ddcd924..9b0dda32 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -17,6 +17,7 @@ let userKeys = builtins.map (user: builtins.readFile ./publicKeys/${user}.pub) users; keys = systemKeys ++ userKeys; in { + "cloudflare.age".publicKeys = keys; "lastFM/apiKey.age".publicKeys = keys; "lastFM/secret.age".publicKeys = keys; "spotify/clientId.age".publicKeys = keys;