Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Jan 13, 2024
1 parent 94add6b commit d035c0d
Showing 1 changed file with 71 additions and 15 deletions.
86 changes: 71 additions & 15 deletions docs/src/modules_schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Add commands to the environment.
```


**Type**: list of (submodule)
**Type**: list of ((package or string convertible to it) or (list with two elements of types: [ string (package or string convertible to it) ]) or (flatOptions))

**Example value**:
```nix
Expand All @@ -72,7 +72,23 @@ Add commands to the environment.
Declared in:
* [modules/commands.nix](https://github.com/numtide/devshell/tree/main/modules/commands.nix)

## `commands.*.package`
## `commands.*`

A config for a command when the `commands` option is a list.


**Type**: (package or string convertible to it) or (list with two elements of types: [ string (package or string convertible to it) ]) or (flatOptions)

**Example value**:
```nix
{"_type":"literalExpression","text":"[\n {\n category = \"scripts\";\n package = \"black\";\n }\n [ \"[package] print hello\" \"hello\" ]\n \"nodePackages.yarn\"\n]\n"}
```


Declared in:
* [nix/commands/types.nix](https://github.com/numtide/devshell/tree/main/nix/commands/types.nix)

## `commands.*.package (flatOptions)`

Used to bring in a specific package. This package will be added to the
environment.
Expand All @@ -84,15 +100,15 @@ environment.
```


**Type**: null or (package or string convertible to it)
**Type**: null or (package or string convertible to it) or package

Declared in:
* [modules/commands.nix](https://github.com/numtide/devshell/tree/main/modules/commands.nix)
* [nix/commands/flatOptions.nix](https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix)

## `commands.*.category`
## `commands.*.category (flatOptions)`

Set a free text category under which this command is grouped
and shown in the help menu.
Sets a free text category under which this command is grouped
and shown in the devshell menu.


**Default value**:
Expand All @@ -104,9 +120,9 @@ and shown in the help menu.
**Type**: string

Declared in:
* [modules/commands.nix](https://github.com/numtide/devshell/tree/main/modules/commands.nix)
* [nix/commands/flatOptions.nix](https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix)

## `commands.*.command`
## `commands.*.command (flatOptions)`

If defined, it will add a script with the name of the command, and the
content of this value.
Expand All @@ -130,9 +146,29 @@ provided.


Declared in:
* [modules/commands.nix](https://github.com/numtide/devshell/tree/main/modules/commands.nix)
* [nix/commands/flatOptions.nix](https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix)

## `commands.*.expose (flatOptions)`

When `true`, the `command (flatOptions)`
or the `package (flatOptions)` will be added to the environment.

Otherwise, they will not be added to the environment, but will be printed
in the devshell menu.


**Default value**:
```nix
{"_type":"literalExpression","text":"true"}
```

## `commands.*.help`

**Type**: boolean

Declared in:
* [nix/commands/flatOptions.nix](https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix)

## `commands.*.help (flatOptions)`

Describes what the command does in one line of text.

Expand All @@ -146,11 +182,15 @@ Describes what the command does in one line of text.
**Type**: null or string

Declared in:
* [modules/commands.nix](https://github.com/numtide/devshell/tree/main/modules/commands.nix)
* [nix/commands/flatOptions.nix](https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix)

## `commands.*.name`
## `commands.*.name (flatOptions)`

Name of this command. Defaults to attribute name in commands.
Name of this command.

Defaults to a `package (flatOptions)` name or pname if present.

The value of this option is required for a `command (flatOptions)`.


**Default value**:
Expand All @@ -162,7 +202,23 @@ Name of this command. Defaults to attribute name in commands.
**Type**: null or string

Declared in:
* [modules/commands.nix](https://github.com/numtide/devshell/tree/main/modules/commands.nix)
* [nix/commands/flatOptions.nix](https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix)

## `commands.*.prefix (flatOptions)`

Prefix of the command name in the devshell menu.


**Default value**:
```nix
{"_type":"literalExpression","text":"\"\""}
```


**Type**: string

Declared in:
* [nix/commands/flatOptions.nix](https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix)

## `devshell.packages`

Expand Down

0 comments on commit d035c0d

Please sign in to comment.