mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 02:44:30 +00:00
nixos/tasks: invariant option docs MD conversions
This commit is contained in:
parent
860a0449ce
commit
b115622f4b
@ -16,33 +16,33 @@ let
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = "The block device is backed by an encrypted one, adds this device as a initrd luks entry.";
|
||||
description = lib.mdDoc "The block device is backed by an encrypted one, adds this device as a initrd luks entry.";
|
||||
};
|
||||
|
||||
blkDev = mkOption {
|
||||
default = null;
|
||||
example = "/dev/sda1";
|
||||
type = types.nullOr types.str;
|
||||
description = "Location of the backing encrypted device.";
|
||||
description = lib.mdDoc "Location of the backing encrypted device.";
|
||||
};
|
||||
|
||||
label = mkOption {
|
||||
default = null;
|
||||
example = "rootfs";
|
||||
type = types.nullOr types.str;
|
||||
description = "Label of the unlocked encrypted device. Set <literal>fileSystems.<name?>.device</literal> to <literal>/dev/mapper/<label></literal> to mount the unlocked device.";
|
||||
description = lib.mdDoc "Label of the unlocked encrypted device. Set `fileSystems.<name?>.device` to `/dev/mapper/<label>` to mount the unlocked device.";
|
||||
};
|
||||
|
||||
keyFile = mkOption {
|
||||
default = null;
|
||||
example = "/mnt-root/root/.swapkey";
|
||||
type = types.nullOr types.str;
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Path to a keyfile used to unlock the backing encrypted
|
||||
device. At the time this keyfile is accessed, the
|
||||
<literal>neededForBoot</literal> filesystems (see
|
||||
<literal>fileSystems.<name?>.neededForBoot</literal>)
|
||||
will have been mounted under <literal>/mnt-root</literal>,
|
||||
`neededForBoot` filesystems (see
|
||||
`fileSystems.<name?>.neededForBoot`)
|
||||
will have been mounted under `/mnt-root`,
|
||||
so the keyfile path should usually start with "/mnt-root/".
|
||||
'';
|
||||
};
|
||||
|
@ -14,7 +14,7 @@ in
|
||||
d2 = "/mnt/disk2/";
|
||||
d3 = "/mnt/disk3/";
|
||||
};
|
||||
description = "SnapRAID data disks.";
|
||||
description = lib.mdDoc "SnapRAID data disks.";
|
||||
type = attrsOf str;
|
||||
};
|
||||
parityFiles = mkOption {
|
||||
@ -27,7 +27,7 @@ in
|
||||
"/mnt/diskt/snapraid.5-parity"
|
||||
"/mnt/disku/snapraid.6-parity"
|
||||
];
|
||||
description = "SnapRAID parity files.";
|
||||
description = lib.mdDoc "SnapRAID parity files.";
|
||||
type = listOf str;
|
||||
};
|
||||
contentFiles = mkOption {
|
||||
@ -37,46 +37,46 @@ in
|
||||
"/mnt/disk1/snapraid.content"
|
||||
"/mnt/disk2/snapraid.content"
|
||||
];
|
||||
description = "SnapRAID content list files.";
|
||||
description = lib.mdDoc "SnapRAID content list files.";
|
||||
type = listOf str;
|
||||
};
|
||||
exclude = mkOption {
|
||||
default = [ ];
|
||||
example = [ "*.unrecoverable" "/tmp/" "/lost+found/" ];
|
||||
description = "SnapRAID exclude directives.";
|
||||
description = lib.mdDoc "SnapRAID exclude directives.";
|
||||
type = listOf str;
|
||||
};
|
||||
touchBeforeSync = mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
description =
|
||||
"Whether <command>snapraid touch</command> should be run before <command>snapraid sync</command>.";
|
||||
description = lib.mdDoc
|
||||
"Whether {command}`snapraid touch` should be run before {command}`snapraid sync`.";
|
||||
type = bool;
|
||||
};
|
||||
sync.interval = mkOption {
|
||||
default = "01:00";
|
||||
example = "daily";
|
||||
description = "How often to run <command>snapraid sync</command>.";
|
||||
description = lib.mdDoc "How often to run {command}`snapraid sync`.";
|
||||
type = str;
|
||||
};
|
||||
scrub = {
|
||||
interval = mkOption {
|
||||
default = "Mon *-*-* 02:00:00";
|
||||
example = "weekly";
|
||||
description = "How often to run <command>snapraid scrub</command>.";
|
||||
description = lib.mdDoc "How often to run {command}`snapraid scrub`.";
|
||||
type = str;
|
||||
};
|
||||
plan = mkOption {
|
||||
default = 8;
|
||||
example = 5;
|
||||
description =
|
||||
"Percent of the array that should be checked by <command>snapraid scrub</command>.";
|
||||
description = lib.mdDoc
|
||||
"Percent of the array that should be checked by {command}`snapraid scrub`.";
|
||||
type = int;
|
||||
};
|
||||
olderThan = mkOption {
|
||||
default = 10;
|
||||
example = 20;
|
||||
description =
|
||||
description = lib.mdDoc
|
||||
"Number of days since data was last scrubbed before it can be scrubbed again.";
|
||||
type = int;
|
||||
};
|
||||
@ -90,7 +90,7 @@ in
|
||||
autosave 500
|
||||
pool /pool
|
||||
'';
|
||||
description = "Extra config options for SnapRAID.";
|
||||
description = lib.mdDoc "Extra config options for SnapRAID.";
|
||||
type = lines;
|
||||
};
|
||||
};
|
||||
|
@ -10,7 +10,7 @@ in {
|
||||
};
|
||||
|
||||
mdadmConf = lib.mkOption {
|
||||
description = "Contents of <filename>/etc/mdadm.conf</filename> in initrd.";
|
||||
description = lib.mdDoc "Contents of {file}`/etc/mdadm.conf` in initrd.";
|
||||
type = lib.types.lines;
|
||||
default = "";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user