summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2019-04-17 17:41:51 +0200
committerlassulus <lassulus@lassul.us>2019-04-17 17:41:51 +0200
commit0dc099791b311afabf4ce26de98e9ab628b2d2a0 (patch)
treecbf52974fd47dd5cbae2238ed073228e90305a6c
parentcef929303a5c0a992aeddedc6aa57d503c7891df (diff)
l mors.r: add dns update scripts
-rw-r--r--lass/1systems/mors/config.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix
index 52bcc9e15..3db29a712 100644
--- a/lass/1systems/mors/config.nix
+++ b/lass/1systems/mors/config.nix
@@ -137,6 +137,18 @@ with import <stockholm/lib>;
(pkgs.writeDashBin "btc-kraken" ''
${pkgs.curl}/bin/curl -Ss 'https://api.kraken.com/0/public/Ticker?pair=BTCEUR' | ${pkgs.jq}/bin/jq '.result.XXBTZEUR.a[0]'
'')
+ (pkgs.writeDashBin "krebsco.de" ''
+ TMPDIR=$(${pkgs.coreutils}/bin/mktemp -d)
+ ${pkgs.brain}/bin/brain show krebs-secrets/ovh-secrets.json > "$TMPDIR"/ovh-secrets.json
+ OVH_ZONE_CONFIG="$TMPDIR"/ovh-secrets.json ${pkgs.krebszones}/bin/krebszones import
+ ${pkgs.coreutils}/bin/rm -rf "$TMPDIR"
+ '')
+ (pkgs.writeDashBin "lassul.us" ''
+ TMPDIR=$(${pkgs.coreutils}/bin/mktemp -d)
+ ${pkgs.pass}/bin/pass show admin/ovh/api.config > "$TMPDIR"/ovh-secrets.json
+ OVH_ZONE_CONFIG="$TMPDIR"/ovh-secrets.json ${pkgs.ovh-zone}/bin/ovh-zone import /etc/zones/lassul.us lassul.us
+ ${pkgs.coreutils}/bin/rm -rf "$TMPDIR"
+ '')
];
#TODO: fix this shit