Skip to content

Commit

Permalink
Remove mdDoc treewide, as it is a deprecated option
Browse files Browse the repository at this point in the history
  • Loading branch information
catwith1hat committed Jun 27, 2024
1 parent 189102f commit 63df967
Show file tree
Hide file tree
Showing 23 changed files with 254 additions and 254 deletions.
12 changes: 6 additions & 6 deletions modules/backup/lib.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
lib: {
options = with lib; {
enable = mkEnableOption (mdDoc "Enable backup");
enable = mkEnableOption "Enable backup";

btrfs = {
enable = mkEnableOption (mdDoc "Enable btrfs snapshots for the state directory, if supported by the underlying filesystem");
enable = mkEnableOption "Enable btrfs snapshots for the state directory, if supported by the underlying filesystem";

snapshotRetention = mkOption {
type = types.int;
description = mdDoc "Number of days to retain snapshots";
description = "Number of days to retain snapshots";
default = 7;
example = "10";
};

snapshotDirectory = mkOption {
type = types.path;
description = mdDoc ''
description = ''
Directory in which to create the btrfs snapshots. Must be located on the same volume as the state directory
'';
default = "/snapshots";
Expand All @@ -23,13 +23,13 @@ lib: {

metadata.interval = mkOption {
type = types.ints.between 1 60;
description = mdDoc "Time interval in seconds between capturing backup metadata";
description = "Time interval in seconds between capturing backup metadata";
default = 10;
};

schedule = mkOption {
type = types.str;
description = mdDoc "Schedule for creating a backup. Format is the same as systemd.time";
description = "Schedule for creating a backup. Format is the same as systemd.time";
default = "hourly";
example = "daily";
};
Expand Down
18 changes: 9 additions & 9 deletions modules/backup/restic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ lib:
with lib; {
passwordFile = mkOption {
type = types.str;
description = lib.mdDoc ''
description = ''
Read the repository password from a file.
'';
example = "/etc/nixos/restic-password";
Expand All @@ -12,7 +12,7 @@ with lib; {
environmentFile = mkOption {
type = with types; nullOr str;
default = null;
description = lib.mdDoc ''
description = ''
file containing the credentials to access the repository, in the
format of an EnvironmentFile as described by systemd.exec(5)
'';
Expand All @@ -21,7 +21,7 @@ with lib; {
rcloneOptions = mkOption {
type = with types; nullOr (attrsOf (oneOf [str bool]));
default = null;
description = lib.mdDoc ''
description = ''
Options to pass to rclone to control its behavior.
See <https://rclone.org/docs/#options> for
available options. When specifying option names, strip the
Expand All @@ -38,7 +38,7 @@ with lib; {
rcloneConfig = mkOption {
type = with types; nullOr (attrsOf (oneOf [str bool]));
default = null;
description = lib.mdDoc ''
description = ''
Configuration for the rclone remote being used for backup.
See the remote's specific options under rclone's docs at
<https://rclone.org/docs/>. When specifying
Expand All @@ -62,7 +62,7 @@ with lib; {
rcloneConfigFile = mkOption {
type = with types; nullOr path;
default = null;
description = lib.mdDoc ''
description = ''
Path to the file containing rclone configuration. This file
must contain configuration for the remote specified in this backup
set and also must be readable by root. Options set in
Expand All @@ -74,7 +74,7 @@ with lib; {
repository = mkOption {
type = with types; nullOr str;
default = null;
description = lib.mdDoc ''
description = ''
repository to backup to.
'';
example = "sftp:backup@192.168.1.100:/backups/my-bucket";
Expand All @@ -83,7 +83,7 @@ with lib; {
repositoryFile = mkOption {
type = with types; nullOr path;
default = null;
description = lib.mdDoc ''
description = ''
Path to the file containing the repository location to backup to.
'';
};
Expand All @@ -95,7 +95,7 @@ with lib; {
"keystore"
"**/nodekey"
];
description = lib.mdDoc ''
description = ''
Patterns to exclude when backing up. See
https://restic.readthedocs.io/en/latest/040_backup.html#excluding-files for
details on syntax.
Expand All @@ -110,7 +110,7 @@ with lib; {
extraOptions = mkOption {
type = types.listOf types.str;
default = [];
description = lib.mdDoc ''
description = ''
Extra extended options to be passed to the restic --option flag.
'';
example = [
Expand Down
50 changes: 25 additions & 25 deletions modules/erigon/args.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ with lib; {
datadir = mkOption {
type = types.nullOr types.str;
default = null;
description = mdDoc "Data directory for Erigon. Defaults to '%S/erigon-\<name\>', which generally resolves to /var/lib/erigon-\<name\>.";
description = "Data directory for Erigon. Defaults to '%S/erigon-\<name\>', which generally resolves to /var/lib/erigon-\<name\>.";
};

port = mkOption {
type = types.port;
default = 30303;
description = mdDoc "Network listening port.";
description = "Network listening port.";
};

snapshots = mkOption {
type = types.bool;
default = true;
description = mdDoc ''
description = ''
Default: use snapshots "true" for BSC, Mainnet and Goerli. use snapshots "false" in all other cases.
'';
};

externalcl = mkEnableOption (mdDoc "enables external consensus");
externalcl = mkEnableOption "enables external consensus";

chain = mkOption {
type = types.enum [
Expand All @@ -38,49 +38,49 @@ with lib; {
"chiado"
];
default = "mainnet";
description = mdDoc "Name of the network to join. If null the network is mainnet.";
description = "Name of the network to join. If null the network is mainnet.";
};

torrent = {
port = mkOption {
type = types.port;
default = 42069;
description = mdDoc "Port to listen and serve BitTorrent protocol .";
description = "Port to listen and serve BitTorrent protocol .";
};
};

http = {
enable = mkOption {
type = types.bool;
default = true;
description = mdDoc "Enable HTTP-RPC server";
description = "Enable HTTP-RPC server";
};

addr = mkOption {
type = types.str;
default = "127.0.0.1";
description = mdDoc "HTTP-RPC server listening interface.";
description = "HTTP-RPC server listening interface.";
};

port = mkOption {
type = types.port;
default = 8545;
description = mdDoc "HTTP-RPC server listening port.";
description = "HTTP-RPC server listening port.";
};

compression = mkEnableOption (mdDoc "Enable compression over HTTP-RPC.");
compression = mkEnableOption "Enable compression over HTTP-RPC.";

corsdomain = mkOption {
type = types.nullOr (types.listOf types.str);
default = null;
description = mdDoc "List of domains from which to accept cross origin requests.";
description = "List of domains from which to accept cross origin requests.";
example = ["*"];
};

vhosts = mkOption {
type = types.listOf types.str;
default = ["localhost"];
description = mdDoc ''
description = ''
Comma separated list of virtual hostnames from which to accept requests (server enforced).
Accepts '*' wildcard.
'';
Expand All @@ -89,11 +89,11 @@ with lib; {

api = mkOption {
type = types.nullOr (types.listOf types.str);
description = mdDoc "API's offered over the HTTP-RPC interface.";
description = "API's offered over the HTTP-RPC interface.";
example = ["net" "eth"];
};

trace = mkEnableOption (mdDoc "Trace HTTP requests with INFO level");
trace = mkEnableOption "Trace HTTP requests with INFO level";

timeouts = {
idle = mkOption {
Expand Down Expand Up @@ -124,27 +124,27 @@ with lib; {
};

ws = {
enable = mkEnableOption (mdDoc "Erigon WebSocket API");
compression = mkEnableOption (mdDoc "Enable compression over HTTP-RPC.");
enable = mkEnableOption "Erigon WebSocket API";
compression = mkEnableOption "Enable compression over HTTP-RPC.";
};

authrpc = {
addr = mkOption {
type = types.str;
default = "127.0.0.1";
description = mdDoc "HTTP-RPC server listening interface for the Engine API.";
description = "HTTP-RPC server listening interface for the Engine API.";
};

port = mkOption {
type = types.port;
default = 8551;
description = mdDoc "HTTP-RPC server listening port for the Engine API";
description = "HTTP-RPC server listening port for the Engine API";
};

vhosts = mkOption {
type = types.listOf types.str;
default = ["localhost"];
description = mdDoc ''
description = ''
Comma separated list of virtual hostnames from which to accept Engine API requests
(server enforced). Accepts '*' wildcard."
'';
Expand All @@ -154,7 +154,7 @@ with lib; {
jwtsecret = mkOption {
type = types.nullOr types.str;
default = null;
description = mdDoc "Path to the token that ensures safe connection between CL and EL.";
description = "Path to the token that ensures safe connection between CL and EL.";
example = "/var/run/erigon/jwtsecret";
};

Expand Down Expand Up @@ -190,32 +190,32 @@ with lib; {
addr = mkOption {
type = types.str;
default = "127.0.0.1:9090";
description = mdDoc ''
description = ''
Private api network address, for example: 127.0.0.1:9090, empty string means not to start the listener. Do not expose to public network. Serves remote database interface.
'';
};
ratelimit = mkOption {
type = types.int;
default = 31872;
description = mdDoc ''
description = ''
Amount of requests server handle simultaneously - requests over this limit will wait. Increase it - if clients see 'request timeout' while server load is low - it means your 'hot data' is small or have much RAM.
'';
};
};

metrics = {
enable = mkEnableOption (mdDoc "Enable metrics collection and reporting.");
enable = mkEnableOption "Enable metrics collection and reporting.";

addr = mkOption {
type = types.str;
default = "127.0.0.1";
description = mdDoc "Enable stand-alone metrics HTTP server listening interface.";
description = "Enable stand-alone metrics HTTP server listening interface.";
};

port = mkOption {
type = types.port;
default = 6060;
description = mdDoc "Metrics HTTP server listening port";
description = "Metrics HTTP server listening port";
};
};
}
14 changes: 7 additions & 7 deletions modules/erigon/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,37 @@

erigonOpts = with lib; {
options = {
enable = mkEnableOption (mdDoc "Erigon Ethereum Node.");
enable = mkEnableOption "Erigon Ethereum Node.";

subVolume = mkEnableOption (mdDoc "Use a subvolume for the state directory if the underlying filesystem supports it e.g. btrfs");
subVolume = mkEnableOption "Use a subvolume for the state directory if the underlying filesystem supports it e.g. btrfs";

inherit args;

extraArgs = mkOption {
type = types.listOf types.str;
description = mdDoc "Additional arguments to pass to Erigon.";
description = "Additional arguments to pass to Erigon.";
default = [];
};

package = mkOption {
type = types.package;
default = pkgs.erigon;
defaultText = literalExpression "pkgs.erigon";
description = mdDoc "Package to use as Erigon node.";
description = "Package to use as Erigon node.";
};

service = {
supplementaryGroups = mkOption {
default = [];
type = types.listOf types.str;
description = mdDoc "Additional groups for the systemd service e.g. sops-nix group for secret access";
description = "Additional groups for the systemd service e.g. sops-nix group for secret access";
};
};

openFirewall = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc "Open ports in the firewall for any enabled networking services";
description = "Open ports in the firewall for any enabled networking services";
};
};
};
Expand All @@ -46,6 +46,6 @@ in {
mkOption {
type = types.attrsOf (types.submodule erigonOpts);
default = {};
description = mdDoc "Specification of one or more erigon instances.";
description = "Specification of one or more erigon instances.";
};
}
Loading

0 comments on commit 63df967

Please sign in to comment.