{ config, lib, pkgs, ... }: with lib; let hostOpts = { name, ... }: { options = with types; { ip = mkOption { type = str; description = "IP of this host on the WireGuard network."; }; public-key = mkOption { type = str; description = "WireGuard public key of this host."; }; }; }; wg-keys = config.fudo.secrets.files.wireguard.keys; in { options.fudo.services.wireguard = with types; { hosts = mkOption { type = attrsOf (submodule hostOpts); default = {}; }; }; }