aboutsummaryrefslogtreecommitdiff
path: root/modules/services/options.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services/options.nix')
-rw-r--r--modules/services/options.nix43
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";
};
};
};