1 { config, lib, pkgs, ... }:
13 description = "Whether to run the tinydns dns server";
19 description = "The DNS data to serve, in the format described by tinydns-data(8)";
25 description = "IP address on which to listen for connections";
32 config = mkIf config.services.tinydns.enable {
33 environment.systemPackages = [ pkgs.djbdns ];
35 users.users.tinydns = {
39 users.groups.tinydns = {};
41 systemd.services.tinydns = {
42 description = "djbdns tinydns server";
43 wantedBy = [ "multi-user.target" ];
44 after = [ "network.target" ];
45 path = with pkgs; [ daemontools djbdns ];
47 rm -rf /var/lib/tinydns
48 tinydns-conf tinydns tinydns /var/lib/tinydns ${config.services.tinydns.ip}
49 cd /var/lib/tinydns/root/
50 ln -sf ${pkgs.writeText "tinydns-data" config.services.tinydns.data} data