diff options
| author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-04-14 23:02:32 +0200 |
|---|---|---|
| committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-04-19 04:05:50 +0200 |
| commit | def1e23be848848400d1d097d4f044e3c401f9dd (patch) | |
| tree | 7a69686dea36e304c788531fda90bc3edeee86fd /modules/nix | |
| parent | 99b3f9a1f5d2604d542f367d38001dfa40eea7b9 (diff) | |
treewide: remove lib.mdDoc
Diffstat (limited to 'modules/nix')
| -rw-r--r-- | modules/nix/default.nix | 80 | ||||
| -rw-r--r-- | modules/nix/linux-builder.nix | 24 | ||||
| -rw-r--r-- | modules/nix/nixpkgs.nix | 14 |
3 files changed, 59 insertions, 59 deletions
diff --git a/modules/nix/default.nix b/modules/nix/default.nix index ef5ce6c..2213a38 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -169,7 +169,7 @@ in type = types.package; default = pkgs.nix; defaultText = literalExpression "pkgs.nix"; - description = lib.mdDoc '' + description = '' This option specifies the Nix package instance to use throughout the system. ''; }; @@ -178,7 +178,7 @@ in useDaemon = mkOption { type = types.bool; default = false; - description = lib.mdDoc '' + description = '' If set, Nix will use the daemon to perform operations. Use this instead of services.nix-daemon.enable if you don't want the daemon service to be managed for you. @@ -188,7 +188,7 @@ in distributedBuilds = mkOption { type = types.bool; default = false; - description = lib.mdDoc '' + description = '' Whether to distribute builds to the machines listed in {option}`nix.buildMachines`. @@ -201,7 +201,7 @@ in daemonProcessType = mkOption { type = types.enum [ "Background" "Standard" "Adaptive" "Interactive" ]; default = "Standard"; - description = lib.mdDoc '' + description = '' Nix daemon process resource limits class. These limits propagate to build processes. `Standard` is the default process type and will apply light resource limits, throttling its CPU usage and I/O @@ -216,7 +216,7 @@ in daemonIOLowPriority = mkOption { type = types.bool; default = false; - description = lib.mdDoc '' + description = '' Whether the Nix daemon process should considered to be low priority when doing file system I/O. ''; @@ -228,7 +228,7 @@ in hostName = mkOption { type = types.str; example = "nixbuilder.example.org"; - description = lib.mdDoc '' + description = '' The hostname of the build machine. ''; }; @@ -236,7 +236,7 @@ in type = types.enum [ null "ssh" "ssh-ng" ]; default = "ssh"; example = "ssh-ng"; - description = lib.mdDoc '' + description = '' The protocol used for communicating with the build machine. Use `ssh-ng` if your remote builder and your local Nix version support that improved protocol. @@ -249,7 +249,7 @@ in type = types.nullOr types.str; default = null; example = "x86_64-linux"; - description = lib.mdDoc '' + description = '' The system type the build machine can execute derivations on. Either this attribute or {var}`systems` must be present, where {var}`system` takes precedence if @@ -260,7 +260,7 @@ in type = types.listOf types.str; default = [ ]; example = [ "x86_64-linux" "aarch64-linux" ]; - description = lib.mdDoc '' + description = '' The system types the build machine can execute derivations on. Either this attribute or {var}`system` must be present, where {var}`system` takes precedence if @@ -271,7 +271,7 @@ in type = types.nullOr types.str; default = null; example = "builder"; - description = lib.mdDoc '' + description = '' The username to log in as on the remote host. This user must be able to log in and run nix commands non-interactively. It must also be privileged to build derivations, so must be included in @@ -282,7 +282,7 @@ in type = types.nullOr types.str; default = null; example = "/root/.ssh/id_buildhost_builduser"; - description = lib.mdDoc '' + description = '' The path to the SSH private key with which to authenticate on the build machine. The private key must not have a passphrase. If null, the building user (root on NixOS machines) must have an @@ -295,7 +295,7 @@ in maxJobs = mkOption { type = types.int; default = 1; - description = lib.mdDoc '' + description = '' The number of concurrent jobs the build machine supports. The build machine will enforce its own limits, but this allows hydra to schedule better since there is no work-stealing between build @@ -305,7 +305,7 @@ in speedFactor = mkOption { type = types.int; default = 1; - description = lib.mdDoc '' + description = '' The relative speed of this builder. This is an arbitrary integer that indicates the speed of this builder, relative to other builders. Higher is faster. @@ -315,7 +315,7 @@ in type = types.listOf types.str; default = [ ]; example = [ "big-parallel" ]; - description = lib.mdDoc '' + description = '' A list of features mandatory for this builder. The builder will be ignored for derivations that don't require all features in this list. All mandatory features are automatically included in @@ -326,7 +326,7 @@ in type = types.listOf types.str; default = [ ]; example = [ "kvm" "big-parallel" ]; - description = lib.mdDoc '' + description = '' A list of features supported by this builder. The builder will be ignored for derivations that require features not in this list. @@ -335,7 +335,7 @@ in publicHostKey = mkOption { type = types.nullOr types.str; default = null; - description = lib.mdDoc '' + description = '' The (base64-encoded) public host key of this builder. The field is calculated via {command}`base64 -w0 /etc/ssh/ssh_host_type_key.pub`. If null, SSH will use its regular known-hosts file when connecting. @@ -344,7 +344,7 @@ in }; }); default = [ ]; - description = lib.mdDoc '' + description = '' This option lists the machines to be used if distributed builds are enabled (see {option}`nix.distributedBuilds`). Nix will perform derivations on those machines via SSH by copying the @@ -358,21 +358,21 @@ in type = types.attrs; internal = true; default = { }; - description = lib.mdDoc "Environment variables used by Nix."; + description = "Environment variables used by Nix."; }; # Not in NixOS module configureBuildUsers = mkOption { type = types.bool; default = false; - description = lib.mdDoc '' + description = '' Enable configuration for nixbld group and users. ''; }; nrBuildUsers = mkOption { type = types.int; - description = lib.mdDoc '' + description = '' Number of `nixbld` user accounts created to perform secure concurrent builds. If you receive an error message saying that “all build users are currently in use”, @@ -388,7 +388,7 @@ in { darwin-config = "${config.environment.darwinConfig}"; } "/nix/var/nix/profiles/per-user/root/channels" ]; - description = lib.mdDoc '' + description = '' The default Nix expression search path, used by the Nix evaluator to look up paths enclosed in angle brackets (e.g. `<nixpkgs>`). @@ -402,7 +402,7 @@ in checkConfig = mkOption { type = types.bool; default = true; - description = lib.mdDoc '' + description = '' If enabled (the default), checks for data type mismatches and that Nix can parse the generated nix.conf. ''; @@ -424,25 +424,25 @@ in from = mkOption { type = referenceAttrs; example = { type = "indirect"; id = "nixpkgs"; }; - description = lib.mdDoc "The flake reference to be rewritten."; + description = "The flake reference to be rewritten."; }; to = mkOption { type = referenceAttrs; example = { type = "github"; owner = "my-org"; repo = "my-nixpkgs"; }; - description = lib.mdDoc "The flake reference {option}`from` is rewritten to."; + description = "The flake reference {option}`from` is rewritten to."; }; flake = mkOption { type = types.nullOr types.attrs; default = null; example = literalExpression "nixpkgs"; - description = lib.mdDoc '' + description = '' The flake input {option}`from` is rewritten to. ''; }; exact = mkOption { type = types.bool; default = true; - description = lib.mdDoc '' + description = '' Whether the {option}`from` reference needs to match exactly. If set, a {option}`from` reference like `nixpkgs` does not match with a reference like `nixpkgs/nixos-20.03`. @@ -463,7 +463,7 @@ in } )); default = { }; - description = lib.mdDoc '' + description = '' A system-wide flake registry. ''; }; @@ -475,7 +475,7 @@ in keep-outputs = true keep-derivations = true ''; - description = lib.mdDoc "Additional text appended to {file}`nix.conf`."; + description = "Additional text appended to {file}`nix.conf`."; }; settings = mkOption { @@ -487,7 +487,7 @@ in type = types.either types.int (types.enum [ "auto" ]); default = "auto"; example = 64; - description = lib.mdDoc '' + description = '' This option defines the maximum number of jobs that Nix will try to build in parallel. The default is auto, which means it will use all available logical cores. It is recommend to set it to the total @@ -500,7 +500,7 @@ in type = types.bool; default = false; example = true; - description = lib.mdDoc '' + description = '' If set to true, Nix automatically detects files in the store that have identical contents, and replaces them with hard links to a single copy. This saves disk space. If set to false (the default), you can still run @@ -512,7 +512,7 @@ in type = types.int; default = 0; example = 64; - description = lib.mdDoc '' + description = '' This option defines the maximum number of concurrent tasks during one build. It affects, e.g., -j option for make. The special value 0 means that the builder should use all @@ -525,7 +525,7 @@ in sandbox = mkOption { type = types.either types.bool (types.enum [ "relaxed" ]); default = false; - description = lib.mdDoc '' + description = '' If set, Nix will perform builds in a sandboxed environment that it will set up automatically for each build. This prevents impurities in builds by disallowing access to dependencies outside of the Nix @@ -539,7 +539,7 @@ in type = types.listOf types.str; default = [ ]; example = [ "/dev" "/proc" ]; - description = lib.mdDoc '' + description = '' Directories from the host filesystem to be included in the sandbox. ''; @@ -547,7 +547,7 @@ in substituters = mkOption { type = types.listOf types.str; - description = lib.mdDoc '' + description = '' List of binary cache URLs used to obtain pre-built binaries of Nix packages. @@ -559,7 +559,7 @@ in type = types.listOf types.str; default = [ ]; example = [ "https://hydra.nixos.org/" ]; - description = lib.mdDoc '' + description = '' List of binary cache URLs that non-root users can use (in addition to those specified using {option}`nix.settings.substituters`) by passing @@ -570,7 +570,7 @@ in require-sigs = mkOption { type = types.bool; default = true; - description = lib.mdDoc '' + description = '' If enabled (the default), Nix will only download binaries from binary caches if they are cryptographically signed with any of the keys listed in {option}`nix.settings.trusted-public-keys`. If disabled, signatures are neither @@ -582,7 +582,7 @@ in trusted-public-keys = mkOption { type = types.listOf types.str; example = [ "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs=" ]; - description = lib.mdDoc '' + description = '' List of public keys used to sign binary caches. If {option}`nix.settings.trusted-public-keys` is enabled, then Nix will use a binary from a binary cache if and only @@ -596,7 +596,7 @@ in type = types.listOf types.str; default = [ "root" ]; example = [ "root" "alice" "@admin" ]; - description = lib.mdDoc '' + description = '' A list of names of users that have additional rights when connecting to the Nix daemon, such as the ability to specify additional binary caches, or to import unsigned NARs. You @@ -626,7 +626,7 @@ in type = types.listOf types.str; default = [ "*" ]; example = [ "@admin" "@builders" "alice" "bob" ]; - description = lib.mdDoc '' + description = '' A list of names of users (separated by whitespace) that are allowed to connect to the Nix daemon. As with {option}`nix.settings.trusted-users`, you can specify groups by @@ -639,7 +639,7 @@ in }; }; default = { }; - description = lib.mdDoc '' + description = '' Configuration for Nix, see <https://nixos.org/manual/nix/stable/#sec-conf-file> for avalaible options. diff --git a/modules/nix/linux-builder.nix b/modules/nix/linux-builder.nix index ecaf686..176d69e 100644 --- a/modules/nix/linux-builder.nix +++ b/modules/nix/linux-builder.nix @@ -33,13 +33,13 @@ in ]; options.nix.linux-builder = { - enable = mkEnableOption (lib.mdDoc "Linux builder"); + enable = mkEnableOption "Linux builder"; package = mkOption { type = types.package; default = pkgs.darwin.linux-builder; defaultText = "pkgs.darwin.linux-builder"; - description = lib.mdDoc '' + description = '' This option specifies the Linux builder to use. ''; }; @@ -54,7 +54,7 @@ in environment.systemPackages = [ pkgs.neovim ]; }) ''; - description = lib.mdDoc '' + description = '' This option specifies extra NixOS configuration for the builder. You should first use the Linux builder without changing the builder configuration otherwise you may not be able to build the Linux builder. ''; @@ -65,7 +65,7 @@ in default = []; defaultText = literalExpression ''[]''; example = literalExpression ''[ "big-parallel" ]''; - description = lib.mdDoc '' + description = '' A list of features mandatory for the Linux builder. The builder will be ignored for derivations that don't require all features in this list. All mandatory features are automatically included in @@ -79,7 +79,7 @@ in type = types.ints.positive; default = 1; example = 4; - description = lib.mdDoc '' + description = '' The number of concurrent jobs the Linux builder machine supports. The build machine will enforce its own limits, but this allows hydra to schedule better since there is no work-stealing between build @@ -94,7 +94,7 @@ in default = "ssh-ng"; defaultText = literalExpression ''"ssh-ng"''; example = literalExpression ''"ssh"''; - description = lib.mdDoc '' + description = '' The protocol used for communicating with the build machine. Use `ssh-ng` if your remote builder and your local Nix version support that improved protocol. @@ -108,7 +108,7 @@ in type = types.ints.positive; default = 1; defaultText = literalExpression ''1''; - description = lib.mdDoc '' + description = '' The relative speed of the Linux builder. This is an arbitrary integer that indicates the speed of this builder, relative to other builders. Higher is faster. @@ -122,7 +122,7 @@ in default = [ "kvm" "benchmark" "big-parallel" ]; defaultText = literalExpression ''[ "kvm" "benchmark" "big-parallel" ]''; example = literalExpression ''[ "kvm" "big-parallel" ]''; - description = lib.mdDoc '' + description = '' A list of features supported by the Linux builder. The builder will be ignored for derivations that require features not in this list. @@ -141,7 +141,7 @@ in "aarch64-linux" ] ''; - description = lib.mdDoc '' + description = '' This option specifies system types the build machine can execute derivations on. This sets the corresponding `nix.buildMachines.*.systems` option. @@ -152,18 +152,18 @@ in workingDirectory = mkOption { type = types.str; default = "/var/lib/darwin-builder"; - description = lib.mdDoc '' + description = '' The working directory of the Linux builder daemon process. ''; }; - ephemeral = mkEnableOption (lib.mdDoc '' + ephemeral = mkEnableOption '' wipe the builder's filesystem on every restart. This is disabled by default as maintaining the builder's Nix Store reduces rebuilds. You can enable this if you don't want your builder to accumulate state. - ''); + ''; }; config = mkIf cfg.enable { diff --git a/modules/nix/nixpkgs.nix b/modules/nix/nixpkgs.nix index 52aec9a..8b3e428 100644 --- a/modules/nix/nixpkgs.nix +++ b/modules/nix/nixpkgs.nix @@ -143,7 +143,7 @@ in pkgs = mkOption { type = pkgsType; example = literalExpression "import <nixpkgs> {}"; - description = lib.mdDoc '' + description = '' If set, the pkgs argument to all nix-darwin modules is the value of this option, extended with `nixpkgs.overlays`, if that is also set. The nix-darwin and Nixpkgs architectures must @@ -171,7 +171,7 @@ in { allowBroken = true; allowUnfree = true; } ''; type = configType; - description = lib.mdDoc '' + description = '' The configuration of the Nix Packages collection. (For details, see the Nixpkgs documentation.) It allows you to set package configuration options. @@ -194,7 +194,7 @@ in ] ''; type = types.listOf overlayType; - description = lib.mdDoc '' + description = '' List of overlays to use with the Nix Packages collection. (For details, see the Nixpkgs documentation.) It allows you to override packages globally. Each function in the list @@ -214,7 +214,7 @@ in # Make sure that the final value has all fields for sake of other modules # referring to this. TODO make `lib.systems` itself use the module system. apply = lib.systems.elaborate; - description = lib.mdDoc '' + description = '' Specifies the platform where the nix-darwin configuration will run. To cross-compile, set also `nixpkgs.buildPlatform`. @@ -232,7 +232,7 @@ in apply = lib.systems.elaborate; defaultText = literalExpression ''config.nixpkgs.hostPlatform''; - description = lib.mdDoc '' + description = '' Specifies the platform on which nix-darwin should be built. By default, nix-darwin is built on the system where it runs, but you can change where it's built. Setting this option will cause nix-darwin to be @@ -266,7 +266,7 @@ in defaultText = lib.literalMD '' Traditionally `builtins.currentSystem`, but unset when invoking nix-darwin through `lib.darwinSystem`. ''; - description = lib.mdDoc '' + description = '' Specifies the Nix platform type on which nix-darwin should be built. It is better to specify `nixpkgs.hostPlatform` instead. @@ -281,7 +281,7 @@ in defaultText = literalMD '' `<nixpkgs>` or nix-darwin's `nixpkgs` flake input ''; - description = lib.mdDoc '' + description = '' The path to import Nixpkgs from. If you're setting a custom [](#opt-nixpkgs.pkgs) or `_module.args.pkgs`, setting this to something with `rev` and `shortRev` attributes (such as a |
