diff options
author | Théophane Hufschmitt <theophane.hufschmitt@tweag.io> | 2023-11-27 19:41:30 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2024-05-03 16:26:16 +0200 |
commit | 8458d98b274910e35baceda77f3e573817ed9f41 (patch) | |
tree | 27fc81d23320a98c5a532a5ccc2ffbbdca2de960 /doc/manual | |
parent | 6f0636a7ed40bb1254b294eedac4f7ca04d387d6 (diff) |
Rename `nix show-config` to `nix config show`
Part of #7672
My main motivation is to be able to use `nix.checkConfig`[1]. This
doesn't work with Lix currently since the module uses `nix show-config`
if the Nix version is <2.20pre and `nix config show` otherwise. I think
this is the only instance where nixpkgs checks for which Nix commands
exist that affects us now, so I figured we could just perform the rename
here as well[2] and still provide the current version number[3].
I don't have a strong opinion on whether to deprecate `nix show-config`,
the warning is added there automatically.
(cherry picked from commit f300e11b056dea414d7d77bbc6e5a7dc5d9ddd41)
[1] https://nixos.org/manual/nixos/stable/options.html#opt-nix.checkConfig
[2] I should add that I don't use the "official" ways of installing Lix
because using the flake directly and callPackaging it seemed to fit
better into my workflow: I already have a little mess to make
sure Hydra from the flake uses the correct pkgs.nix and I didn't
want to complicate it further while keeping a single package-set I
can build in CI. Don't get me wrong, I think such a module for a
quick-start is very important, just giving context on why I bother
in the first place :)
[3] When we go public, I think it's worth considering to add support in
nixpkgs itself for Lix.
Change-Id: I47b4239b05cbeda3c370d2fa56ea768b768768ac
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/local.mk | 4 | ||||
-rw-r--r-- | doc/manual/meson.build | 3 | ||||
-rw-r--r-- | doc/manual/rl-next/nix-config-show.md | 7 | ||||
-rw-r--r-- | doc/manual/src/SUMMARY.md | 2 | ||||
-rw-r--r-- | doc/manual/src/command-ref/new-cli/nix3-config-show.md | 1 | ||||
-rw-r--r-- | doc/manual/src/command-ref/new-cli/nix3-config.md | 1 | ||||
-rw-r--r-- | doc/manual/src/command-ref/new-cli/nix3-show-config.md | 1 |
7 files changed, 15 insertions, 4 deletions
diff --git a/doc/manual/local.mk b/doc/manual/local.mk index 215609f79..50c67b8ae 100644 --- a/doc/manual/local.mk +++ b/doc/manual/local.mk @@ -29,7 +29,7 @@ man-pages += $(foreach subcommand, \ clean-files += $(d)/*.1 $(d)/*.5 $(d)/*.8 # Provide a dummy environment for nix, so that it will not access files outside the macOS sandbox. -# Set cores to 0 because otherwise nix show-config resolves the cores based on the current machine +# Set cores to 0 because otherwise nix config show resolves the cores based on the current machine dummy-env = env -i \ HOME=/dummy \ NIX_CONF_DIR=/dummy \ @@ -89,7 +89,7 @@ doc/manual/generated/in/nix.json: $(doc_nix) doc/manual/generated/in/conf-file.json: $(doc_nix) @mkdir -p doc/manual/generated/in - $(trace-gen) $(dummy-env) $(doc_nix) show-config --json --experimental-features nix-command > $@.tmp + $(trace-gen) $(dummy-env) $(doc_nix) config show --json --experimental-features nix-command > $@.tmp @mv $@.tmp $@ doc/manual/generated/in/contributing/experimental-feature-descriptions.md: doc/manual/generated/in/xp-features.json $(d)/utils.nix $(d)/generate-xp-features.nix $(doc_nix) diff --git a/doc/manual/meson.build b/doc/manual/meson.build index cfb6be36f..e253a9bd8 100644 --- a/doc/manual/meson.build +++ b/doc/manual/meson.build @@ -197,6 +197,8 @@ endforeach nix3_manpages = [ 'nix3-build', 'nix3-bundle', + 'nix3-config', + 'nix3-config-show', 'nix3-copy', 'nix3-daemon', 'nix3-derivation-add', @@ -258,7 +260,6 @@ nix3_manpages = [ 'nix3-run', 'nix3-search', 'nix3-shell', - 'nix3-show-config', 'nix3-store-add-file', 'nix3-store-add-path', 'nix3-store-cat', diff --git a/doc/manual/rl-next/nix-config-show.md b/doc/manual/rl-next/nix-config-show.md new file mode 100644 index 000000000..1e7545e73 --- /dev/null +++ b/doc/manual/rl-next/nix-config-show.md @@ -0,0 +1,7 @@ +--- +synopsis: rename 'nix show-config' to 'nix config show' +issues: 7672 +prs: 9477 +--- + +`nix show-config` was renamed to `nix config show` to be more consistent with the rest of the command-line interface. diff --git a/doc/manual/src/SUMMARY.md b/doc/manual/src/SUMMARY.md index 7747b9061..2437c0dc5 100644 --- a/doc/manual/src/SUMMARY.md +++ b/doc/manual/src/SUMMARY.md @@ -91,6 +91,8 @@ - [nix](command-ref/new-cli/nix.md) - [nix build](command-ref/new-cli/nix3-build.md) - [nix bundle](command-ref/new-cli/nix3-bundle.md) + - [nix config](command-ref/new-cli/nix3-config.md) + - [nix config show](command-ref/new-cli/nix3-config-show.md) - [nix copy](command-ref/new-cli/nix3-copy.md) - [nix daemon](command-ref/new-cli/nix3-daemon.md) - [nix derivation](command-ref/new-cli/nix3-derivation.md) diff --git a/doc/manual/src/command-ref/new-cli/nix3-config-show.md b/doc/manual/src/command-ref/new-cli/nix3-config-show.md new file mode 100644 index 000000000..a39cd13e9 --- /dev/null +++ b/doc/manual/src/command-ref/new-cli/nix3-config-show.md @@ -0,0 +1 @@ +{{#include @generated@/command-ref/new-cli/nix3-config-show.md}} diff --git a/doc/manual/src/command-ref/new-cli/nix3-config.md b/doc/manual/src/command-ref/new-cli/nix3-config.md new file mode 100644 index 000000000..ba824c7bc --- /dev/null +++ b/doc/manual/src/command-ref/new-cli/nix3-config.md @@ -0,0 +1 @@ +{{#include @generated@/command-ref/new-cli/nix3-config.md}} diff --git a/doc/manual/src/command-ref/new-cli/nix3-show-config.md b/doc/manual/src/command-ref/new-cli/nix3-show-config.md deleted file mode 100644 index 060fc065d..000000000 --- a/doc/manual/src/command-ref/new-cli/nix3-show-config.md +++ /dev/null @@ -1 +0,0 @@ -{{#include @generated@/command-ref/new-cli/nix3-show-config.md}} |