diff options
Diffstat (limited to 'kartei/makefu/default.nix')
-rw-r--r-- | kartei/makefu/default.nix | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/kartei/makefu/default.nix b/kartei/makefu/default.nix index 5e236d57..bad2311e 100644 --- a/kartei/makefu/default.nix +++ b/kartei/makefu/default.nix @@ -2,8 +2,10 @@ # tinc generate-keys # ssh-keygen -f ssh.id_ed25519 -t ed25519 -C host -with import ../../lib; -{ config, ... }: let +{ config, lib, ... }: let + inherit (builtins) foldl' mapAttrs pathExists readFile; + inherit (lib) optionalAttrs recursiveUpdate; + slib = import ../../lib/pure.nix { inherit lib; }; hostDefaults = hostName: host: foldl' recursiveUpdate {} [ { @@ -19,7 +21,7 @@ with import ../../lib; "${hostName}.r" ]; ip6.addr = - (krebs.genipv6 "retiolum" "makefu" { inherit hostName; }).address; + (slib.krebs.genipv6 "retiolum" "makefu" { inherit hostName; }).address; }; }) # Retiolum ed25519 keys @@ -37,7 +39,7 @@ with import ../../lib; "${hostName}.w" ]; ip6.addr = - (krebs.genipv6 "wiregrill" "makefu" { inherit hostName; }).address; + (slib.krebs.genipv6 "wiregrill" "makefu" { inherit hostName; }).address; wireguard.pubkey = readFile pubkey-path; }; }) @@ -54,7 +56,7 @@ with import ../../lib; ]; pub-for = name: builtins.readFile (./ssh + "/${name}.pub"); - w6 = ip: (krebs.genipv6 "wiregrill" "makefu" ip).address; + w6 = ip: (slib.krebs.genipv6 "wiregrill" "makefu" ip).address; in { hosts = mapAttrs hostDefaults { cake = rec { @@ -104,7 +106,8 @@ in { nets = { retiolum.ip4.addr = "10.243.0.91"; wiregrill = { - # defaults + ip4.addr = "10.243.245.6"; + aliases = [ "x.w" ]; }; }; @@ -120,6 +123,12 @@ in { ci = true; syncthing.id = "Y5OTK3S-JOJLAUU-KTBXKUW-M7S5UEQ-MMQPUK2-7CXO5V6-NOUDLKP-PRGAFAK"; nets = { + wiregrill = { + aliases = ["omo.w" "hass.omo.w" "jelly.omo.w" "jelly.makefu.w" ]; + ip6.addr = (slib.krebs.genipv6 "wiregrill" "makefu" { hostName = "omo"; }).address; + ip4.addr = "10.244.245.5"; + + }; retiolum = { ip4.addr = "10.243.0.89"; aliases = [ @@ -149,7 +158,7 @@ in { # pixel3a telex.nets.wiregrill = { aliases = ["telex.w"]; - ip6.addr = (krebs.genipv6 "wiregrill" "makefu" { hostName = "telex"; }).address; + ip6.addr = (slib.krebs.genipv6 "wiregrill" "makefu" { hostName = "telex"; }).address; ip4.addr = "10.244.245.4"; }; @@ -239,6 +248,7 @@ in { play.work.euer IN A ${nets.internet.ip4.addr} ul.work.euer IN A ${nets.internet.ip4.addr} music.euer IN A ${nets.internet.ip4.addr} + ntfy.euer IN A ${nets.internet.ip4.addr} ''; }; nets = rec { @@ -255,7 +265,7 @@ in { ip6.addr = w6 "1"; wireguard.port = 51821; wireguard.subnets = [ - (krebs.genipv6 "wiregrill" "makefu" 0).subnetCIDR + (slib.krebs.genipv6 "wiregrill" "makefu" 0).subnetCIDR "10.244.245.0/24" # required for routing directly to gum via rockit ]; }; |