Compare commits

..

No commits in common. "1821fe37c8c62f1773e4843bafbe6f1115d78bc1" and "a1afdcbdd0bfe883598aab00df64d5dc1281062d" have entirely different histories.

4 changed files with 33 additions and 51 deletions

View file

@ -216,11 +216,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1713453913, "lastModified": 1713294767,
"narHash": "sha256-vbXq52VRlL1defMHrwhsoeHm95O3mFefsSSJyNEghbA=", "narHash": "sha256-LmaabaQZdx52MPGKPRt9Opoc9Gd9RbwvCdysUUYQoXI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "178e26895b3aef028a00a32fb7e7ed0fc660645c", "rev": "fa8c16e2452bf092ac76f09ee1fb1e9f7d0796e7",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,22 +1,18 @@
{ self, pkgs, lib, config, dns, ... }: { self, pkgs, lib, config, dns, ... }:
let let
modulo = number: mod: (number - ((number / mod) * mod));
secondary = "185.181.104.96"; secondary = "185.181.104.96";
domain = config.networking.domain; zonefile = with dns.lib.combinators; pkgs.writeText "rfive.de.zone.txt" (dns.lib.toString "rfive.de" {
zonefile = with dns.lib.combinators; pkgs.writeText "rfive.de.zone.txt" (dns.lib.toString domain {
TTL = 3600; TTL = 3600;
SOA = SOA = {
let nameServer = "ns.rfive.de.";
modulo = number: mod: (number - ((number / mod) * mod)); adminEmail = "hostmaster@rfive.de";
in serial = lib.strings.toInt (builtins.substring 0 8 self.sourceInfo.lastModifiedDate + toString ((modulo self.sourceInfo.lastModified 86400) / 864));
{ refresh = 10800;
nameServer = "ns.rfive.de."; retry = 3600;
adminEmail = "hostmaster@rfive.de"; expire = 604800;
serial = lib.strings.toInt (builtins.substring 0 8 self.sourceInfo.lastModifiedDate + toString ((modulo self.sourceInfo.lastModified 86400) / 864)); minimum = 3600;
refresh = 10800; };
retry = 3600;
expire = 604800;
minimum = 3600;
};
NS = [ NS = [
"ns.inwx.de." "ns.inwx.de."
"ns2.inwx.de." "ns2.inwx.de."
@ -33,29 +29,24 @@ let
(spf.soft [ "mx" ]) (spf.soft [ "mx" ])
]; ];
subdomains = subdomains = lib.attrsets.mergeAttrsList [
let rec {
getVirtualHosts = hostname: map (name: builtins.substring 0 (builtins.stringLength name - (builtins.stringLength domain + 1)) name) (builtins.attrNames self.nixosConfigurations."${hostname}".config.services.nginx.virtualHosts); nuc = {
genCNAMEs = hostname: lib.attrsets.genAttrs (getVirtualHosts hostname) (label: { CNAME = [ "${hostname}.${domain}." ]; }); A = [ "141.30.227.6" ];
in };
lib.attrsets.mergeAttrsList [ falkenstein = {
rec { A = [ "23.88.121.184" ];
nuc = { AAAA = [ "2a01:4f8:c012:49de::1" ];
A = [ "141.30.227.6" ]; };
}; ns = falkenstein;
falkenstein = { mail = falkenstein;
A = [ "23.88.121.184" ]; _dmarc.TXT = [ "v=DMARC1; p=none; adkim=s; fo=1; rua=mailto:dmarc@rfive.de; ruf=mailto:dmarc@rfive.de" ];
AAAA = [ "2a01:4f8:c012:49de::1" ]; _domainkey.subdomains.rspamd.TXT = [ "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDoirUMubro4nlmY6a8JMwK9QB2agAXiJzexDU/7ba6KCggONfoSTfUHlrM/XeM1GG/9oKpngApxDPP97adJuxc8/EELyo4HjTyYD8GBFZhg0AN7V8IPaJ1o5k6dGDk8ZLh41ZCnlAVWkhVSKs5pYtzkrlJIfUSzyuoe8nuFsVe3QIDAQAB" ];
};
ns = falkenstein;
mail = falkenstein;
_dmarc.TXT = [ "v=DMARC1; p=none; adkim=s; fo=1; rua=mailto:dmarc@rfive.de; ruf=mailto:dmarc@rfive.de" ];
_domainkey.subdomains.rspamd.TXT = [ "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDoirUMubro4nlmY6a8JMwK9QB2agAXiJzexDU/7ba6KCggONfoSTfUHlrM/XeM1GG/9oKpngApxDPP97adJuxc8/EELyo4HjTyYD8GBFZhg0AN7V8IPaJ1o5k6dGDk8ZLh41ZCnlAVWkhVSKs5pYtzkrlJIfUSzyuoe8nuFsVe3QIDAQAB" ];
} }
(genCNAMEs "nuc") (lib.attrsets.genAttrs [ "cache" "chat" "matrix" "seafile" "vault" ] (label: { CNAME = [ "nuc.rfive.de." ]; }))
(builtins.removeAttrs (genCNAMEs "falkenstein") [ "mail" ]) (lib.attrsets.genAttrs [ "purge" "rspamd" "trucks" ] (label: { CNAME = [ "falkenstein.rfive.de." ]; }))
]; ];
}); });
in in
{ {

View file

@ -90,11 +90,7 @@
networkConfig = { networkConfig = {
Address = "192.168.43.4/32"; Address = "192.168.43.4/32";
DNS = "192.168.43.1"; DNS = "192.168.43.1";
Domains = [ Domains = "~vpn.rfive.de ~43.168.192.in-addr.arpa";
"~vpn.rfive.de"
"~42.168.192.in-addr.arpa"
"~43.168.192.in-addr.arpa"
];
DNSSEC = false; DNSSEC = false;
BindCarrier = [ "ens3" ]; BindCarrier = [ "ens3" ];
}; };

View file

@ -25,7 +25,6 @@
nmap nmap
curlFull curlFull
wireguard-tools wireguard-tools
etherape
]; ];
services.timesyncd.servers = lib.mkForce [ ]; services.timesyncd.servers = lib.mkForce [ ];
services.resolved = { services.resolved = {
@ -166,11 +165,7 @@
networkConfig = { networkConfig = {
Address = "192.168.43.3/32"; Address = "192.168.43.3/32";
DNS = "192.168.43.1"; DNS = "192.168.43.1";
Domains = [ Domains = "~vpn.rfive.de ~43.168.192.in-addr.arpa";
"~vpn.rfive.de"
"~42.168.192.in-addr.arpa"
"~43.168.192.in-addr.arpa"
];
DNSSEC = false; DNSSEC = false;
}; };
}; };