mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 05:13:10 +01:00
Compare commits
4 commits
a1afdcbdd0
...
1821fe37c8
Author | SHA1 | Date | |
---|---|---|---|
Rouven Seifert | 1821fe37c8 | ||
Rouven Seifert | 8f0a5e1a8a | ||
Rouven Seifert | 43a4843551 | ||
Rouven Seifert | ee02192290 |
|
@ -216,11 +216,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713294767,
|
"lastModified": 1713453913,
|
||||||
"narHash": "sha256-LmaabaQZdx52MPGKPRt9Opoc9Gd9RbwvCdysUUYQoXI=",
|
"narHash": "sha256-vbXq52VRlL1defMHrwhsoeHm95O3mFefsSSJyNEghbA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "fa8c16e2452bf092ac76f09ee1fb1e9f7d0796e7",
|
"rev": "178e26895b3aef028a00a32fb7e7ed0fc660645c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,18 +1,22 @@
|
||||||
{ 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";
|
||||||
zonefile = with dns.lib.combinators; pkgs.writeText "rfive.de.zone.txt" (dns.lib.toString "rfive.de" {
|
domain = config.networking.domain;
|
||||||
|
zonefile = with dns.lib.combinators; pkgs.writeText "rfive.de.zone.txt" (dns.lib.toString domain {
|
||||||
TTL = 3600;
|
TTL = 3600;
|
||||||
SOA = {
|
SOA =
|
||||||
nameServer = "ns.rfive.de.";
|
let
|
||||||
adminEmail = "hostmaster@rfive.de";
|
modulo = number: mod: (number - ((number / mod) * mod));
|
||||||
serial = lib.strings.toInt (builtins.substring 0 8 self.sourceInfo.lastModifiedDate + toString ((modulo self.sourceInfo.lastModified 86400) / 864));
|
in
|
||||||
refresh = 10800;
|
{
|
||||||
retry = 3600;
|
nameServer = "ns.rfive.de.";
|
||||||
expire = 604800;
|
adminEmail = "hostmaster@rfive.de";
|
||||||
minimum = 3600;
|
serial = lib.strings.toInt (builtins.substring 0 8 self.sourceInfo.lastModifiedDate + toString ((modulo self.sourceInfo.lastModified 86400) / 864));
|
||||||
};
|
refresh = 10800;
|
||||||
|
retry = 3600;
|
||||||
|
expire = 604800;
|
||||||
|
minimum = 3600;
|
||||||
|
};
|
||||||
NS = [
|
NS = [
|
||||||
"ns.inwx.de."
|
"ns.inwx.de."
|
||||||
"ns2.inwx.de."
|
"ns2.inwx.de."
|
||||||
|
@ -29,24 +33,29 @@ let
|
||||||
(spf.soft [ "mx" ])
|
(spf.soft [ "mx" ])
|
||||||
];
|
];
|
||||||
|
|
||||||
subdomains = lib.attrsets.mergeAttrsList [
|
subdomains =
|
||||||
rec {
|
let
|
||||||
nuc = {
|
getVirtualHosts = hostname: map (name: builtins.substring 0 (builtins.stringLength name - (builtins.stringLength domain + 1)) name) (builtins.attrNames self.nixosConfigurations."${hostname}".config.services.nginx.virtualHosts);
|
||||||
A = [ "141.30.227.6" ];
|
genCNAMEs = hostname: lib.attrsets.genAttrs (getVirtualHosts hostname) (label: { CNAME = [ "${hostname}.${domain}." ]; });
|
||||||
};
|
in
|
||||||
falkenstein = {
|
lib.attrsets.mergeAttrsList [
|
||||||
A = [ "23.88.121.184" ];
|
rec {
|
||||||
AAAA = [ "2a01:4f8:c012:49de::1" ];
|
nuc = {
|
||||||
};
|
A = [ "141.30.227.6" ];
|
||||||
ns = falkenstein;
|
};
|
||||||
mail = falkenstein;
|
falkenstein = {
|
||||||
_dmarc.TXT = [ "v=DMARC1; p=none; adkim=s; fo=1; rua=mailto:dmarc@rfive.de; ruf=mailto:dmarc@rfive.de" ];
|
A = [ "23.88.121.184" ];
|
||||||
_domainkey.subdomains.rspamd.TXT = [ "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDoirUMubro4nlmY6a8JMwK9QB2agAXiJzexDU/7ba6KCggONfoSTfUHlrM/XeM1GG/9oKpngApxDPP97adJuxc8/EELyo4HjTyYD8GBFZhg0AN7V8IPaJ1o5k6dGDk8ZLh41ZCnlAVWkhVSKs5pYtzkrlJIfUSzyuoe8nuFsVe3QIDAQAB" ];
|
AAAA = [ "2a01:4f8:c012:49de::1" ];
|
||||||
|
};
|
||||||
|
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" ];
|
||||||
|
|
||||||
}
|
}
|
||||||
(lib.attrsets.genAttrs [ "cache" "chat" "matrix" "seafile" "vault" ] (label: { CNAME = [ "nuc.rfive.de." ]; }))
|
(genCNAMEs "nuc")
|
||||||
(lib.attrsets.genAttrs [ "purge" "rspamd" "trucks" ] (label: { CNAME = [ "falkenstein.rfive.de." ]; }))
|
(builtins.removeAttrs (genCNAMEs "falkenstein") [ "mail" ])
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -90,7 +90,11 @@
|
||||||
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 = "~vpn.rfive.de ~43.168.192.in-addr.arpa";
|
Domains = [
|
||||||
|
"~vpn.rfive.de"
|
||||||
|
"~42.168.192.in-addr.arpa"
|
||||||
|
"~43.168.192.in-addr.arpa"
|
||||||
|
];
|
||||||
DNSSEC = false;
|
DNSSEC = false;
|
||||||
BindCarrier = [ "ens3" ];
|
BindCarrier = [ "ens3" ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
nmap
|
nmap
|
||||||
curlFull
|
curlFull
|
||||||
wireguard-tools
|
wireguard-tools
|
||||||
|
etherape
|
||||||
];
|
];
|
||||||
services.timesyncd.servers = lib.mkForce [ ];
|
services.timesyncd.servers = lib.mkForce [ ];
|
||||||
services.resolved = {
|
services.resolved = {
|
||||||
|
@ -165,7 +166,11 @@
|
||||||
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 = "~vpn.rfive.de ~43.168.192.in-addr.arpa";
|
Domains = [
|
||||||
|
"~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