TimothyYe / godns

A dynamic DNS client tool that supports AliDNS, Cloudflare, Google Domains, DNSPod, HE.net & DuckDNS & DreamHost, etc, written in Go.
https://timothyye.github.io/godns/
Apache License 2.0
1.5k stars 220 forks source link

Read credentials from files or support environment variables #142

Closed tboerger closed 2 years ago

tboerger commented 2 years ago

I'm currently building a module on my NixOS machine that configures GoDNS, since I will store my configuration on gitHub I want to use a tool like agenix to store my secrets/credentials encrypted within this repository. Unluckily agenix does not support password strings to be injected, it supports only provising files containing the secrets which could be mounted to specific paths.

For this use case it would be great to define an attribute like passwordFile which provides the path to the file containing the password which gets read by GoDNS.

An alternative could be to support environment variables, in that case I could just add a wrapper script that sources the password from the secrets file.