diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-01-11 13:36:45 -0600 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-01-11 13:36:45 -0600 |
| commit | dbc5cb478c7fad1c1750421486252f0a5d98ef9c (patch) | |
| tree | 2ca74b6cf1db48e2a1a4989b13a6bc7ac6dcfe32 /modules/services | |
| parent | 32a7e59b93a9c3748cd6aeca3d4fc9dadf8e0f59 (diff) | |
now there's docs
Diffstat (limited to 'modules/services')
| -rw-r--r-- | modules/services/options.nix | 43 |
1 files changed, 30 insertions, 13 deletions
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"; }; }; }; |
