From dbc5cb478c7fad1c1750421486252f0a5d98ef9c Mon Sep 17 00:00:00 2001 From: Collin Williams <96917990+bluedragon1221@users.noreply.github.com> Date: Sun, 11 Jan 2026 13:36:45 -0600 Subject: now there's docs --- modules/services/options.nix | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) (limited to 'modules/services/options.nix') diff --git a/modules/services/options.nix b/modules/services/options.nix index 16bf5ac..231c949 100644 --- a/modules/services/options.nix +++ b/modules/services/options.nix @@ -18,36 +18,47 @@ in { networkd = { enable = mkEnableOption "use systemd-networkd"; - ssid = mkOption {type = lib.types.str;}; - pskFile = mkOption {type = lib.types.str;}; + ssid = mkOption { + description = "SSID for this network"; + type = lib.types.str; + }; + pskFile = mkOption { + description = "Absolute path to a file containing the pre-shared key for this network"; + type = lib.types.str; + example = "/run/secrets.d/wifi-psk"; + }; static = lib.mkOption { + description = "Set a static IP address for this device on this network. Set to null to use DHCP"; type = lib.types.nullOr (lib.types.submodule { options = { - ip = mkOption {type = ip_addr_cidr;}; - gateway = mkOption {type = ip_addr;}; + ip = mkOption { + description = "IP address"; + type = ip_addr_cidr; + }; + gateway = mkOption { + description = "default gateway"; + type = ip_addr; + }; }; }); default = null; }; }; - tailscale = { - enable = mkEnableOption "tailscale"; - tailnet = mkOption { - type = lib.types.str; - default = "tail7cca06.ts.net"; - }; - }; + + tailscale.enable = mkEnableOption "tailscale"; + sshd = { enable = mkEnableOption "OpenSSH server"; bind_host = mkOption { + description = "The IP address on which OpenSSH will listen for incomming connections. The default, `0.0.0.0`, means 'all interfaces'"; type = ip_addr; default = "0.0.0.0"; }; }; }; - audio.enable = mkEnableOption "pipewire + wireplumber"; + audio.enable = mkEnableOption "pipewire and wireplumber"; bluetooth = { enable = mkEnableOption "bluetooth"; @@ -64,24 +75,28 @@ in { service_name = mkOption { type = lib.types.str; + internal = true; }; bind_host = mkOption { + description = "The IP address on which ${service_name} will listen for incoming connections. The default, `0.0.0.0`, means 'all interfaces'"; type = ip_addr; default = "0.0.0.0"; }; port = mkOption { + description = "The port on which ${service_name} will listen for incomming connections"; type = lib.types.port; default = default_port; }; root_url = mkOption { + description = "The final url that this service will be hosted on. Required for caddy, otherwise optional"; type = lib.types.nullOr lib.types.str; }; caddy = { enable = mkEnableOption "Automatically create caddy configurations for this service"; - bind_tailscale = mkEnableOption "Bind the service to {service_name}.{tailnet}"; + bind_tailscale = mkEnableOption "Bind the service to ${service_name}.{tailnet}"; }; }; in { @@ -103,7 +118,9 @@ in { caddy = { enable = mkEnableOption "caddy https server"; envFile = mkOption { + description = "Absolute path to file that contains environment variables for caddy operations"; type = lib.types.str; + example = "/run/secrets.d/caddy-env"; }; }; }; -- cgit v1.3.1