mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 13:23:11 +01:00
Compare commits
No commits in common. "1821fe37c8c62f1773e4843bafbe6f1115d78bc1" and "a1afdcbdd0bfe883598aab00df64d5dc1281062d" have entirely different histories.
1821fe37c8
...
a1afdcbdd0
|
@ -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": {
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
{ self, pkgs, lib, config, dns, ... }:
|
{ self, pkgs, lib, config, dns, ... }:
|
||||||
let
|
|
||||||
secondary = "185.181.104.96";
|
|
||||||
domain = config.networking.domain;
|
|
||||||
zonefile = with dns.lib.combinators; pkgs.writeText "rfive.de.zone.txt" (dns.lib.toString domain {
|
|
||||||
TTL = 3600;
|
|
||||||
SOA =
|
|
||||||
let
|
let
|
||||||
modulo = number: mod: (number - ((number / mod) * mod));
|
modulo = number: mod: (number - ((number / mod) * mod));
|
||||||
in
|
secondary = "185.181.104.96";
|
||||||
{
|
zonefile = with dns.lib.combinators; pkgs.writeText "rfive.de.zone.txt" (dns.lib.toString "rfive.de" {
|
||||||
|
TTL = 3600;
|
||||||
|
SOA = {
|
||||||
nameServer = "ns.rfive.de.";
|
nameServer = "ns.rfive.de.";
|
||||||
adminEmail = "hostmaster@rfive.de";
|
adminEmail = "hostmaster@rfive.de";
|
||||||
serial = lib.strings.toInt (builtins.substring 0 8 self.sourceInfo.lastModifiedDate + toString ((modulo self.sourceInfo.lastModified 86400) / 864));
|
serial = lib.strings.toInt (builtins.substring 0 8 self.sourceInfo.lastModifiedDate + toString ((modulo self.sourceInfo.lastModified 86400) / 864));
|
||||||
|
@ -33,12 +29,7 @@ let
|
||||||
(spf.soft [ "mx" ])
|
(spf.soft [ "mx" ])
|
||||||
];
|
];
|
||||||
|
|
||||||
subdomains =
|
subdomains = lib.attrsets.mergeAttrsList [
|
||||||
let
|
|
||||||
getVirtualHosts = hostname: map (name: builtins.substring 0 (builtins.stringLength name - (builtins.stringLength domain + 1)) name) (builtins.attrNames self.nixosConfigurations."${hostname}".config.services.nginx.virtualHosts);
|
|
||||||
genCNAMEs = hostname: lib.attrsets.genAttrs (getVirtualHosts hostname) (label: { CNAME = [ "${hostname}.${domain}." ]; });
|
|
||||||
in
|
|
||||||
lib.attrsets.mergeAttrsList [
|
|
||||||
rec {
|
rec {
|
||||||
nuc = {
|
nuc = {
|
||||||
A = [ "141.30.227.6" ];
|
A = [ "141.30.227.6" ];
|
||||||
|
@ -53,8 +44,8 @@ let
|
||||||
_domainkey.subdomains.rspamd.TXT = [ "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDoirUMubro4nlmY6a8JMwK9QB2agAXiJzexDU/7ba6KCggONfoSTfUHlrM/XeM1GG/9oKpngApxDPP97adJuxc8/EELyo4HjTyYD8GBFZhg0AN7V8IPaJ1o5k6dGDk8ZLh41ZCnlAVWkhVSKs5pYtzkrlJIfUSzyuoe8nuFsVe3QIDAQAB" ];
|
_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
|
||||||
|
|
|
@ -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" ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue