1
0
Fork 0

some docs revamps

This commit is contained in:
Pierre Penninckx 2023-11-30 12:06:41 -08:00 committed by GitHub
parent 59df934222
commit 54ce26efce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 41 additions and 35 deletions

View file

@ -36,7 +36,7 @@ let
};
repositories = lib.mkOption {
description = lib.mdDoc "Repositories to back this instance to.";
description = "Repositories to back this instance to.";
type = lib.types.nonEmptyListOf lib.types.str;
};
@ -96,26 +96,26 @@ in
{
options.shb.backup = {
onlyOnAC = lib.mkOption {
description = lib.mdDoc "Run backups only if AC power is plugged in.";
description = "Run backups only if AC power is plugged in.";
default = true;
example = false;
type = lib.types.bool;
};
user = lib.mkOption {
description = lib.mdDoc "Unix user doing the backups.";
description = "Unix user doing the backups.";
type = lib.types.str;
default = "backup";
};
group = lib.mkOption {
description = lib.mdDoc "Unix group doing the backups.";
description = "Unix group doing the backups.";
type = lib.types.str;
default = "backup";
};
instances = lib.mkOption {
description = lib.mdDoc "Each instance is a backup setting";
description = "Each instance is a backup setting";
default = {};
type = lib.types.attrsOf (lib.types.submodule {
options = instanceOptions;
@ -123,7 +123,7 @@ in
};
borgServer = lib.mkOption {
description = lib.mdDoc "Add borgbackup package so external backups can use this server as a remote.";
description = "Add borgbackup package so external backups can use this server as a remote.";
default = false;
example = true;
type = lib.types.bool;

View file

@ -59,7 +59,7 @@ in
};
autheliaProtect = lib.mkOption {
description = lib.mdDoc "Endpoints to be protected by authelia.";
description = "Endpoints to be protected by authelia.";
type = lib.types.listOf autheliaConfig;
default = [];
};

View file

@ -6,7 +6,7 @@ in
options.shb.postgresql = {
debug = lib.mkOption {
type = lib.types.bool;
description = lib.mdDoc ''
description = ''
Enable debugging options.
Currently enables shared_preload_libraries = "auto_explain, pg_stat_statements"

View file

@ -21,7 +21,8 @@ in
credentialsFile = lib.mkOption {
type = lib.types.path;
description = ''Credentials file location for the chosen DNS provider.
description = ''
Credentials file location for the chosen DNS provider.
The content of this file must expose environment variables as written in the
[documentation](https://go-acme.github.io/lego/dns/) of each DNS provider.
@ -38,17 +39,19 @@ in
additionalCfg = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
description = lib.mdDoc ''Additional environment variables used to configure the DNS provider.
description = ''Additional environment variables used to configure the DNS provider.
For secrets, use shb.ssl.credentialsFile instead.
See the chose provider's [documentation](https://go-acme.github.io/lego/dns/) for available
options.
'';
example = lib.literalExpression ''{
example = lib.literalExpression ''
{
DNSPROVIDER_TIMEOUT = "10";
DNSPROVIDER_PROPAGATION_TIMEOUT = "240";
}'';
}
'';
};
dnsResolver = lib.mkOption {

View file

@ -33,19 +33,19 @@ in
let
instanceOption = types.submodule {
options = {
enable = mkEnableOption (lib.mdDoc "Tinyproxy daemon");
enable = mkEnableOption "Tinyproxy daemon";
package = mkPackageOptionMD pkgs "tinyproxy" {};
dynamicBindFile = mkOption {
description = lib.mdDoc ''
description = ''
File holding the IP to bind to.
'';
default = "";
};
settings = mkOption {
description = lib.mdDoc ''
description = ''
Configuration for [tinyproxy](https://tinyproxy.github.io/).
'';
default = { };
@ -63,21 +63,21 @@ in
Listen = mkOption {
type = types.str;
default = "127.0.0.1";
description = lib.mdDoc ''
description = ''
Specify which address to listen to.
'';
};
Port = mkOption {
type = types.int;
default = 8888;
description = lib.mdDoc ''
description = ''
Specify which port to listen to.
'';
};
Anonymous = mkOption {
type = types.listOf types.str;
default = [];
description = lib.mdDoc ''
description = ''
If an `Anonymous` keyword is present, then anonymous proxying is enabled. The
headers listed with `Anonymous` are allowed through, while all others are denied.
If no Anonymous keyword is present, then all headers are allowed through. You must
@ -87,7 +87,7 @@ in
Filter = mkOption {
type = types.nullOr types.path;
default = null;
description = lib.mdDoc ''
description = ''
Tinyproxy supports filtering of web sites based on URLs or domains. This option
specifies the location of the file containing the filter rules, one rule per line.
'';

View file

@ -205,40 +205,40 @@ in
let
instanceOption = lib.types.submodule {
options = {
enable = lib.mkEnableOption (lib.mdDoc "OpenVPN config");
enable = lib.mkEnableOption "OpenVPN config";
package = lib.mkPackageOptionMD pkgs "openvpn" {};
provider = lib.mkOption {
description = lib.mdDoc "VPN provider, if given uses ready-made configuration.";
description = "VPN provider, if given uses ready-made configuration.";
type = lib.types.nullOr (lib.types.enum [ "nordvpn" ]);
default = null;
};
dev = lib.mkOption {
description = lib.mdDoc "Name of the interface.";
description = "Name of the interface.";
type = lib.types.str;
example = "tun0";
};
routingNumber = lib.mkOption {
description = lib.mdDoc "Unique number used to route packets.";
description = "Unique number used to route packets.";
type = lib.types.int;
example = 10;
};
remoteServerIP = lib.mkOption {
description = lib.mdDoc "IP of the VPN server to connect to.";
description = "IP of the VPN server to connect to.";
type = lib.types.str;
};
sopsFile = lib.mkOption {
description = lib.mdDoc "Location of file holding authentication secrets for provider.";
description = "Location of file holding authentication secrets for provider.";
type = lib.types.anything;
};
proxyPort = lib.mkOption {
description = lib.mdDoc "If not null, sets up a proxy that listens on the given port and sends traffic to the VPN.";
description = "If not null, sets up a proxy that listens on the given port and sends traffic to the VPN.";
type = lib.types.nullOr lib.types.int;
default = null;
};

View file

@ -42,15 +42,18 @@ let
settingsFormat = pkgs.formats.json {};
moreOptions = {
settings = lib.mkOption {
description = "Specific options for jackett.";
default = {};
type = lib.types.submodule {
freeformType = apps.jackett.settingsFormat.type;
options = {
APIKeyFile = lib.mkOption {
type = lib.types.path;
description = "Path to api key secret file.";
};
FlareSolverrUrl = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = "FlareSolverr endpoint.";
default = null;
};
OmdbApiKeyFile = lib.mkOption {
@ -59,7 +62,7 @@ let
};
ProxyType = lib.mkOption {
type = lib.types.enum [ "-1" "0" "1" "2" ];
default = "0";
default = "-1";
description = ''
-1 = disabled
0 = HTTP
@ -123,7 +126,7 @@ let
default = {};
type = lib.types.submodule {
options = {
enable = lib.mkEnableOption "selfhostblocks.${name}";
enable = lib.mkEnableOption name;
subdomain = lib.mkOption {
type = lib.types.str;
@ -134,7 +137,7 @@ let
domain = lib.mkOption {
type = lib.types.str;
description = "Domain under which ${name} will be served.";
example = "mydomain.com";
example = "example.com";
};
port = lib.mkOption {
@ -145,14 +148,14 @@ let
dataDir = lib.mkOption {
type = lib.types.str;
description = "Directory where state of ${name} is stored.";
description = "Directory where ${name} stores data.";
default = "/var/lib/${name}";
};
oidcEndpoint = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = "OIDC endpoint for SSO";
description = "Endpoint to the SSO provider. Leave null to not have SSO configured.";
example = "https://authelia.example.com";
};

View file

@ -40,13 +40,13 @@ in
};
proxyPort = lib.mkOption {
description = lib.mdDoc "If not null, sets up a deluge to forward all traffic to the Proxy listening at that port.";
description = "If not null, sets up a deluge to forward all traffic to the Proxy listening at that port.";
type = lib.types.nullOr lib.types.int;
default = null;
};
outgoingInterface = lib.mkOption {
description = lib.mdDoc "If not null, sets up a deluge to bind all outgoing traffic to the given interface.";
description = "If not null, sets up a deluge to bind all outgoing traffic to the given interface.";
type = lib.types.nullOr lib.types.str;
default = null;
};

View file

@ -28,7 +28,7 @@ in
};
domain = lib.mkOption {
description = lib.mdDoc "Domain to serve sites under.";
description = "Domain to serve sites under.";
type = lib.types.str;
example = "domain.com";
};

View file

@ -16,7 +16,7 @@ in
};
domain = lib.mkOption {
description = lib.mdDoc "Domain to serve Nextcloud under.";
description = "Domain to serve Nextcloud under.";
type = lib.types.str;
example = "domain.com";
};