{ config, pkgs, lib, ...} @ args: with builtins; with lib; { options.filouterie = with types; { hostName = mkOption { type = str; description = "Node name"; }; clusterPrefix = mkOption { type = str; description = "Cluster IP prefix"; }; clusterNodes = mkOption { description = "Nodes that are part of this cluster"; type = attrsOf (submodule { options = { address = mkOption { type = str; description = "IP Address in the Wireguard network"; }; pubkey = mkOption { type = str; description = "Wireguard public key"; }; endpoint = mkOption { type = str; description = "Wireguard endpoint on the public internet"; }; }; }); }; }; config.filouterie.clusterPrefix = "10.0.0.0/16"; config.filouterie.clusterNodes = { "fifi" = { pubkey = "/TJVF6aLEvqngjd8Gq3QkH5esEQSIL+ryz/uKdJaZEQ="; address = "10.0.1.1"; endpoint = "92.179.73.254:19720"; }; "riri" = { pubkey = "lUUTv85m7vtIKY7+s//AWL5r/epjXSBZNJCrgjRfQj0="; address = "10.0.2.1"; endpoint = "176.159.248.209:19720"; }; "loulou" = { pubkey = "J/liQaChv4ZBjwlLmobM0NA/Wwgl8nDcQEcGdsC5Exc="; address = "10.0.3.1"; endpoint = "82.67.117.71:19720"; }; }; }