This commit is contained in:
Henri Dohmen 2025-05-31 14:22:37 +02:00
parent 1f65e12585
commit 7584ff9a39
5 changed files with 49 additions and 48 deletions

18
var/lan-dns.nix Normal file
View file

@ -0,0 +1,18 @@
{ lib, var, ... }:
let
lan-tld = ".lan";
lan-base-domain = ".hdohmen.de";
lan-hosts = lib.mapAttrs' (name: value: {
name = "${name}${lan-tld}";
inherit value;
}) var.wg.ips;
in
rec {
hostsFile = lib.concatStringsSep "\n" (lib.mapAttrsFlatten (n: v: "${n}\t${v}") hosts);
hosts =
lan-hosts
// lib.mapAttrs' (name: value: {
name = "${name}${lan-base-domain}";
inherit value;
}) lan-hosts;
}