Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
59c5bfc
nixos/nixos-option: Rewrite in a more suitable language
chkno Sep 6, 2019
26c45df
nixos/nixos-option: Show options' types #27920
chkno Sep 6, 2019
74f05df
nixos/nixos-option: Fix references to old name
chkno Sep 6, 2019
4af8dbf
Reformat for 4-space indentation
chkno Sep 6, 2019
36c00c1
Use format strings, not concatenation, in error messages
chkno Sep 6, 2019
e1ecc2b
Remove list sorting
chkno Sep 6, 2019
f3eedb6
Parallel build is the default, so no need to specify
chkno Sep 6, 2019
2336982
Add license
chkno Sep 6, 2019
d89ccc1
Correct syntax for license specification
chkno Sep 6, 2019
c7c684a
Preserve type of rethrown exceptions
chkno Sep 6, 2019
0adf77e
Narrow the «not defined» check to just ThrownError
chkno Sep 6, 2019
6b405f9
Fix missing "using ThrownError"
chkno Sep 6, 2019
8834992
clang-format
chkno Sep 6, 2019
b8db815
Support submodules (Fixes #13121)
chkno Sep 6, 2019
c352bfe
Switch from east const to west const
chkno Sep 16, 2019
4ded9be
Add note: Keep error message in sync with nixos-option
chkno Sep 16, 2019
aa8e1d5
Always say which path component had trouble
chkno Sep 16, 2019
88183eb
Per reviewer request, cast the other side.
chkno Sep 16, 2019
c457766
Use std::get_if
chkno Sep 16, 2019
c967e3f
Hold state and autoArgs by reference
chkno Sep 16, 2019
3d3ce8d
Pass Context by reference
chkno Sep 16, 2019
94a068f
Pass values by reference
chkno Sep 16, 2019
2ddd2d0
Explain why header goes on stderr
chkno Sep 16, 2019
84d5571
Don't print header on stderr
chkno Sep 16, 2019
4d17d5b
snake_case -> camelCase
chkno Sep 16, 2019
5646240
Only print example when there is one
chkno Sep 16, 2019
57a5752
Add maintainer
chkno Sep 16, 2019
a3e31df
(clang-format for has_example)
chkno Sep 18, 2019
445145d
Support aggregate types attrsOf and listOf
chkno Sep 18, 2019
1e79859
snake_case -> camelCase
chkno Sep 20, 2019
754e315
release-notes 20.03: added notice for rewritten nixos-option
globin Oct 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ rec {

# The value with a check that it is defined
valueDefined = if res.isDefined then res.mergedValue else
# (nixos-option detects this specific error message and gives it special
# handling. If changed here, please change it there too.)
throw "The option `${showOption loc}' is used but not defined.";

# Apply the 'apply' function to the merged value. This allows options to
Expand Down
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,12 @@
githubId = 30435868;
name = "Okina Matara";
};
chkno = {
email = "chuck@intelligence.org";
github = "chkno";
githubId = 1118859;
name = "Scott Worley";
};
choochootrain = {
email = "hurshal@imap.cc";
github = "choochootrain";
Expand Down
21 changes: 3 additions & 18 deletions nixos/doc/manual/man-nixos-option.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@
</arg>

<arg>
<option>--verbose</option>
<option>--all</option>
</arg>

<arg>
<option>--xml</option>
</arg>

<arg choice="plain">
<replaceable>option.name</replaceable>
</arg>
</cmdsynopsis>
Expand Down Expand Up @@ -62,22 +58,11 @@
</varlistentry>
<varlistentry>
<term>
<option>--verbose</option>
</term>
<listitem>
<para>
This option enables verbose mode, which currently is just the Bash
<command>set</command> <option>-x</option> debug mode.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--xml</option>
<option>--all</option>
</term>
<listitem>
<para>
This option causes the output to be rendered as XML.
Print the values of all options.
</para>
</listitem>
</varlistentry>
Expand Down
6 changes: 6 additions & 0 deletions nixos/doc/manual/release-notes/rl-2003.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
zfs as soon as any zfs mountpoint is configured in <varname>fileSystems</varname>.
</para>
</listitem>
<listitem>
<para>
<command>nixos-option</command> has been rewritten in C++, speeding it up, improving correctness,
and adding a <option>--all</option> option which prints all options and their values.
</para>
</listitem>
</itemizedlist>
</section>

Expand Down
Loading