5 ms·
> In a much simpler vein, I'm experimenting with machine configuration from within obsidian. The local DNS server sets itself up using a markdown file so editin
by nbbaier 2y ago
> In a much simpler vein, I'm experimenting with machine configuration from within obsidian. The local DNS server sets itself up using a markdown file so editing an IP or adding a new machine can be done by changing that markdown.
This sounds really interesting, any code to look at anywhere or write up about it?
- JonChesterfield 2y agoSimple enough to write inline. There's a file called DNS.md which contains lines like `192.168.1.15 milan` in an obsidian vault. Obsidian sync copies it around. DNS is by pihole which uses a plain text file in that sort of format for the entries. Then superuser's crontab -l 0 * * * * cmp /home/jon/Documents/Obsidian/SystemControl/DNS.md /etc/pihole/custom.list >/dev/null 2>&1 || cat /home/jon/Documents/Obsidian/SystemControl/DNS.md > /etc/pihole/custom.list && sudo -u jon pihole restartdns Cron has rules about relative paths that I don't remember so it's literally written as above. It seems likely that the idea generalises. I'm considering managing public keys for ssh / wireguard in similar fashion but haven't done so yet.