config/data.nix

254 lines
10 KiB
Nix
Raw Normal View History

2023-04-14 14:12:45 +03:00
rec {
2023-07-24 16:31:38 +03:00
uidgid = {
motiejus = 1000;
2024-08-02 14:38:52 +03:00
gitea = 20000;
2023-07-30 05:49:54 +03:00
updaterbot-deployer = 501;
updaterbot-deployee = 502;
2023-08-25 09:55:21 +03:00
# the underscore differentiates "our" user from the
# "upstream" user. We need a way to configure the uidgid,
# so creating users explicitly.
node_exporter = 503;
2023-09-11 15:51:33 +03:00
borgstor = 504;
2023-09-12 13:31:46 +03:00
jakstpub = 505;
2023-09-23 22:56:23 +03:00
2024-02-25 20:04:21 +02:00
remote-builder = 508;
2023-07-24 16:31:38 +03:00
};
2023-08-05 18:28:59 +03:00
ports = {
grafana = 3000;
2023-08-25 09:41:42 +03:00
gitea = 3001;
2024-09-27 15:11:54 +03:00
immich-server = 3002;
immich-machine-learning = 3003; # as of writing, hardcoded in the immich module
2023-09-07 08:29:14 +03:00
2023-08-22 14:26:47 +03:00
soju = 6697;
2024-02-12 15:50:52 +02:00
soju-ws = 6698;
2024-08-03 18:57:29 +03:00
matrix-synapse = 8008;
2024-08-24 21:14:47 +03:00
ssh8022 = 8022;
2023-09-07 08:29:14 +03:00
vaultwarden = 8222;
2024-08-03 06:16:00 +03:00
headscale = 8080;
2023-11-14 09:01:02 +02:00
hass = 8123;
2023-08-25 16:14:12 +03:00
prometheus = 9001;
2023-09-14 14:51:36 +03:00
tailscale = 41641;
2024-09-13 16:29:02 +03:00
exporters = {
2023-09-06 17:44:30 +03:00
2024-09-13 16:29:02 +03:00
node = 9002;
weather = 9011;
# non-configurable in caddy as of 2023-09-06
caddy = 2019;
};
2023-08-05 18:28:59 +03:00
};
2023-07-23 15:23:09 +03:00
people_pubkeys = {
2023-04-14 14:12:45 +03:00
motiejus = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC+qpaaD+FCYPcUU1ONbw/ff5j0xXu5DNvp/4qZH/vOYwG13uDdfI5ISYPs8zNaVcFuEDgNxWorVPwDw4p6+1JwRLlhO4J/5tE1w8Gt6C7y76LRWnp0rCdva5vL3xMozxYIWVOAiN131eyirV2FdOaqTwPy4ouNMmBFbibLQwBna89tbFMG/jwR7Cxt1I6UiYOuCXIocI5YUbXlsXoK9gr5yBRoTjl2OfH2itGYHz9xQCswvatmqrnteubAbkb6IUFYz184rnlVntuZLwzM99ezcG4v8/485gWkotTkOgQIrGNKgOA7UNKpQNbrwdPAMugqfSTo6g8fEvy0Q+6OXdxw5X7en2TJE+BLVaXp4pVMdOAzKF0nnssn64sRhsrUtFIjNGmOWBOR2gGokaJcM6x9R72qxucuG5054pSibs32BkPEg6Qzp+Bh77C3vUmC94YLVg6pazHhLroYSP1xQjfOvXyLxXB1s9rwJcO+s4kqmInft2weyhfaFE0Bjcoc+1/dKuQYfPCPSB//4zvktxTXud80zwWzMy91Q4ucRrHTBz3PrhO8ys74aSGnKOiG3ccD3HbaT0Ff4qmtIwHcAjrnNlINAcH/A2mpi0/2xA7T8WpFnvgtkQbcMF0kEKGnNS5ULZXP/LC8BlLXxwPdqTzvKikkTb661j4PhJhinhVwnQ==";
2024-03-14 11:45:39 +02:00
motiejus_work = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEqKTE7agiqALdEV4pf2cIuXJZ72eks5cYKj4mXsloGX";
2023-04-14 14:12:45 +03:00
};
2023-07-23 15:02:58 +03:00
hosts = {
2024-12-06 01:28:23 +02:00
"vno3-nk.servers.jakst" = rec {
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBp3QL8p4AbuijEQX/uVHj6nkJ2/8qNSciL+Glydw2yK";
system = "x86_64-linux";
2024-12-06 01:31:23 +02:00
jakstIP = "100.89.176.5";
extraHostNames = [
jakstIP
];
2024-12-06 01:28:23 +02:00
};
2024-07-31 00:14:53 +03:00
"fra1-b.servers.jakst" = rec {
extraHostNames = [
"fra1-b.jakstys.lt"
publicIP
jakstIP
];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP1tL1FQeKE+28ATuD4USa4oAdPkONfk4uF/McMm+2sy";
publicIP = "188.245.84.21";
jakstIP = "100.89.176.18";
system = "aarch64-linux";
supportedFeatures = [
"nixos-test"
"benchmark"
"big-parallel"
"kvm"
"gccarch-armv8-a"
];
};
2024-08-05 16:07:23 +03:00
"vno1-gdrx.motiejus.jakst" = rec {
extraHostNames = [
vno1IP
jakstIP
];
2024-08-05 16:07:23 +03:00
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPW7k8wMOIWKERGiMlz5kX/PXJ/EbzUnJK6jVgPtAbNF";
vno1IP = "192.168.189.12";
2024-08-05 16:34:41 +03:00
jakstIP = "100.89.176.21";
2024-08-05 16:07:23 +03:00
};
2024-07-31 09:19:13 +03:00
"fwminex.servers.jakst" = rec {
2024-07-29 15:39:54 +03:00
extraHostNames = [
2024-08-02 14:48:52 +03:00
"jakstys.lt"
"git.jakstys.lt"
2024-08-03 16:55:08 +03:00
"dl.jakstys.lt"
"irc.jakstys.lt"
"www.jakstys.lt"
"vpn.jakstys.lt"
2024-07-29 15:39:54 +03:00
jakstIP
vno1IP
2024-08-03 16:55:08 +03:00
publicIP
2024-07-29 15:39:54 +03:00
];
2023-09-15 13:23:52 +03:00
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHlWSZ/H6DR5i5aCrlrEQLVF9MXNvls/pjlLPLaav3f+";
2024-08-03 16:55:08 +03:00
publicIP = "88.223.107.21";
2023-07-26 11:36:54 +03:00
jakstIP = "100.89.176.6";
2023-09-18 19:31:45 +03:00
vno1IP = "192.168.189.10";
2023-07-26 11:36:54 +03:00
};
2024-03-14 11:38:57 +02:00
"mtworx.motiejus.jakst" = rec {
2024-07-29 15:39:54 +03:00
extraHostNames = [ jakstIP ];
2024-03-14 11:38:57 +02:00
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDRrsOkKkpJ9ZJYhEdxjwrmdVYoPcGDGtcGfBkkpVF6l";
jakstIP = "100.89.176.20";
};
2024-03-06 12:36:26 +02:00
"vno1-vinc.vincentas.jakst" = rec {
2024-07-29 15:39:54 +03:00
extraHostNames = [ jakstIP ];
2024-03-06 12:36:26 +02:00
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJIwK7et5NBM+vaffiwpKLSAJwKfwMhCZwl1JyXo79uL";
jakstIP = "100.89.176.7";
};
2024-11-17 10:55:36 +02:00
"mxp1.motiejus.jakst" = {
jakstIP = "100.89.176.22";
2023-04-14 14:12:45 +03:00
};
"zh2769.rsync.net" = {
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJtclizeBy1Uo3D86HpgD3LONGVH0CJ0NT+YfZlldAJd";
};
"github.com" = {
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl";
};
"git.sr.ht" = {
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMZvRd4EtM7R+IHVMWmDkVU3VLQTSwQDSAvW0t2Tkj60";
};
};
2023-09-12 15:46:44 +03:00
# copied from nixpkgs/lib/attrsets.nix
attrVals = nameList: set: map (x: set.${x}) nameList;
2023-09-12 16:08:08 +03:00
subnets = {
tailscale = {
cidr = "100.89.176.0/20";
range = "100.89.176.0-100.89.191.255";
2024-06-08 00:01:22 +03:00
sshPattern = "100.89.176.*"; # until we have more hosts
2023-09-12 16:08:08 +03:00
};
2024-07-29 15:39:54 +03:00
motiejus.cidrs =
let
mHosts = attrVals [
2024-11-17 10:55:36 +02:00
"mxp1.motiejus.jakst"
"vno1-gdrx.motiejus.jakst"
2024-04-18 19:45:44 +03:00
"mtworx.motiejus.jakst"
2024-07-31 09:19:13 +03:00
"fwminex.servers.jakst"
2024-07-29 15:39:54 +03:00
] hosts;
in
builtins.catAttrs "jakstIP" mHosts;
2023-09-12 15:46:44 +03:00
2023-09-18 20:49:17 +03:00
vno1 = {
cidr = "192.168.189.0/24";
2024-06-08 00:01:22 +03:00
sshPattern = "192.168.189.*";
2023-09-18 20:49:17 +03:00
};
2023-09-14 13:23:04 +03:00
vno3.cidr = "192.168.100.0/24";
2023-04-14 14:12:45 +03:00
};
2024-07-29 15:39:54 +03:00
e11syncZone =
let
2024-07-31 00:34:06 +03:00
fra1b = hosts."fra1-b.servers.jakst".publicIP;
2024-08-03 16:55:08 +03:00
vno1 = hosts."fwminex.servers.jakst".publicIP;
2024-07-29 15:39:54 +03:00
in
''
$ORIGIN 11sync.net.
$TTL 3600
@ SOA ns1.11sync.net. motiejus.11sync.net. (2024011500 86400 86400 86400 86400)
@ NS ns1.11sync.net.
@ NS ns2.11sync.net.
@ A ${vno1}
@ TXT google-site-verification=nvUYd7_ShhPKvTn_Xbw-vPFONOhPeaYQsGp34DbV-80
@ TXT "hosted-email-verify=qeuysotu"
@ MX 10 aspmx1.migadu.com.
@ MX 20 aspmx2.migadu.com.
@ TXT "v=spf1 include:spf.migadu.com -all"
ns1 A ${vno1}
2024-07-31 00:34:06 +03:00
ns2 A ${fra1b}
2024-07-29 15:39:54 +03:00
www A ${vno1}
key1._domainkey CNAME key1.11sync.net._domainkey.migadu.com.
key2._domainkey CNAME key2.11sync.net._domainkey.migadu.com.
key3._domainkey CNAME key3.11sync.net._domainkey.migadu.com.
_dmarc TXT "v=DMARC1; p=quarantine;"
autoconfig CNAME autoconfig.migadu.com.
_autodiscover._tcp SRV 0 1 443 autodiscover.migadu.com.
_submissions._tcp SRV 0 1 465 smtp.migadu.com.
_imaps._tcp SRV 0 1 993 imap.migadu.com.
_pop3s._tcp SRV 0 1 995 pop.migadu.com.
_github-challenge-11sync-org TXT "ff5e813c58"
'';
jakstysLTZone =
let
2024-07-31 00:34:06 +03:00
fra1b = hosts."fra1-b.servers.jakst".publicIP;
2024-08-03 16:55:08 +03:00
vno1 = hosts."fwminex.servers.jakst".publicIP;
2024-07-29 15:39:54 +03:00
in
''
$ORIGIN jakstys.lt.
2024-09-27 15:53:50 +03:00
$TTL 3600
2024-09-29 23:24:37 +03:00
@ 86400 SOA ns1.jakstys.lt. motiejus.jakstys.lt. (2023100800 86400 86400 86400 86400)
@ 86400 NS ns1.jakstys.lt.
@ 86400 NS ns2.jakstys.lt.
@ 3600 HTTPS 1 . alpn="h3,h2" ipv4hint="${vno1}"
2024-07-29 15:39:54 +03:00
@ A ${vno1}
www A ${vno1}
2024-09-27 15:50:44 +03:00
photos A ${hosts."fwminex.servers.jakst".jakstIP}
2024-09-29 23:24:37 +03:00
ns1 86400 A ${vno1}
ns2 86400 A ${fra1b}
2024-07-29 15:39:54 +03:00
vpn A ${vno1}
git A ${vno1}
2024-10-10 06:07:15 +03:00
git 3600 HTTPS 1 . alpn="h3,h2" ipv4hint="${vno1}"
2024-07-29 15:39:54 +03:00
auth A ${vno1}
dl A ${vno1}
2024-07-31 00:34:06 +03:00
fra1-b A ${fra1b}
2024-07-29 15:39:54 +03:00
2024-09-29 23:24:37 +03:00
@ 86400 TXT google-site-verification=sU99fmO8gEJF-0lbOY-IzkovC6MXsP3Gozqrs8BR5OM
@ 86400 TXT hosted-email-verify=rvyd6h64
@ 86400 MX 10 smtp.google.com.
_submission._tcp 86400 SRV 0 1 587 smtp.gmail.com.
_imaps._tcp 86400 SRV 0 1 993 imap.gmail.com.
_pop3s._tcp 86400 SRV 0 1 995 pop.gmail.com.
@ 86400 TXT "v=spf1 include:_spf.google.com ~all"
_dmarc 86400 TXT "v=DMARC1; p=none;"
google._domainkey 86400 TXT "v=DKIM1; k=rsa;" "p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuqOyONnWKk7lgAVB1UcVu/I02gTDjROpQGDNUJHS34faQ9DnM/8uSOaIwCe4oV1GrI8N2ET+f96WPCCs1LzlEA0QwuUoXRLGojjQoXxCntLfMCnRWtehzmZq6Yv8nVva7N0gz/n/LThpPvGfEoKzYjmhjzM5d8y60DGsKxS8r4Lc9TzwtzuYkxKDhcSzVBQQiMvKMi6m6mUsxFya7" "ZTurd5i7iiZXpA3SFBYLAsjhQd6vS7K13vwAZTKjGNijfM40i7KXC5XA5WtojiSY0lZzAMqaHGLDaMUFkWRJJntRheQ+AU9RvOGAufphRAjdQTCMy0BLzC0rilT2JaTGe4MdQIDAQAB"
2024-09-12 16:27:00 +03:00
2024-08-27 08:14:53 +03:00
grafana A ${hosts."fwminex.servers.jakst".jakstIP}
_acme-challenge.grafana CNAME _acme-endpoint.grafana
_acme-endpoint.grafana NS ns._acme-endpoint.grafana
ns._acme-endpoint.grafana A ${vno1}
hass A ${hosts."fwminex.servers.jakst".jakstIP}
_acme-challenge.hass CNAME _acme-endpoint.hass
_acme-endpoint.hass NS ns._acme-endpoint.hass
ns._acme-endpoint.hass A ${vno1}
irc A ${hosts."fwminex.servers.jakst".jakstIP}
_acme-challenge.irc CNAME _acme-endpoint.irc
_acme-endpoint.irc NS ns._acme-endpoint.irc
ns._acme-endpoint.irc A ${vno1}
hass A ${hosts."fwminex.servers.jakst".jakstIP}
_acme-challenge.hass CNAME _acme-endpoint.hass
_acme-endpoint.hass NS ns._acme-endpoint.hass
ns._acme-endpoint.hass A ${vno1}
bitwarden 3600 HTTPS 1 . alpn="h3,h2" ipv4hint="${
hosts."fwminex.servers.jakst".jakstIP
}"
2024-08-27 08:14:53 +03:00
bitwarden A ${hosts."fwminex.servers.jakst".jakstIP}
_acme-challenge.bitwarden CNAME _acme-endpoint.bitwarden
_acme-endpoint.bitwarden NS ns._acme-endpoint.bitwarden
ns._acme-endpoint.bitwarden A ${vno1}
2024-12-06 07:38:03 +02:00
hdd 3600 A ${hosts."vno3-nk.servers.jakst".jakstIP}
2024-08-27 08:14:53 +03:00
_acme-challenge.hdd CNAME _acme-endpoint.hdd
_acme-endpoint.hdd NS ns._acme-endpoint.hdd
ns._acme-endpoint.hdd A ${vno1}
2024-07-29 15:39:54 +03:00
'';
2023-04-05 09:15:02 +03:00
}