From 784d23e6dc129af2f5e9449a2ea77421460839a8 Mon Sep 17 00:00:00 2001 From: fricklerhandwerk Date: Thu, 2 Nov 2023 03:41:54 +0100 Subject: [PATCH] update all links to the Nix manual --- maintainers/documentation-survey.md | 4 +-- source/concepts/faq.md | 10 +++--- source/concepts/flakes.md | 12 +++---- source/guides/best-practices.md | 8 ++--- source/guides/troubleshooting.md | 10 +++--- source/install-nix.md | 4 +-- source/reference/glossary.md | 2 +- source/reference/nix-manual.md | 8 ++--- source/reference/pinning-nixpkgs.md | 6 ++-- .../first-steps/ad-hoc-shell-environments.md | 4 +-- .../first-steps/declarative-shell.md | 2 +- .../first-steps/reproducible-scripts.md | 8 ++--- source/tutorials/nix-language.md | 34 +++++++++---------- .../nixos/deploying-nixos-using-terraform.md | 2 +- .../nixos/nixos-configuration-on-vm.md | 14 ++++---- .../tutorials/packaging-existing-software.md | 2 +- 16 files changed, 65 insertions(+), 65 deletions(-) diff --git a/maintainers/documentation-survey.md b/maintainers/documentation-survey.md index edf95e4aa..d6e3e96c7 100644 --- a/maintainers/documentation-survey.md +++ b/maintainers/documentation-survey.md @@ -236,13 +236,13 @@ To better navigate the material and judge its relevance, every entry should prov ### Nix -- https://nixos.org/manual/nix/stable/command-ref/command-ref.html +- https://nix.dev/manual/nix/2.17/command-ref/command-ref.html - https://edolstra.github.io/pubs/phd-thesis.pdf ### Nix language - https://edolstra.github.io/pubs/phd-thesis.pdf -- https://nixos.org/manual/nix/stable/expressions/writing-nix-expressions.html +- https://nix.dev/manual/nix/2.17/expressions/writing-nix-expressions.html - https://github.com/tazjin/nix-1p ### Nixpkgs diff --git a/source/concepts/faq.md b/source/concepts/faq.md index 30b760b18..da9458eba 100644 --- a/source/concepts/faq.md +++ b/source/concepts/faq.md @@ -14,16 +14,16 @@ The Nix logo is inspired by [an idea for the Haskell logo](https://wiki.haskell. {ref}`Flakes ` were originally proposed in [RFC 49](https://github.com/NixOS/rfcs/pull/49), and have been in development since 2019. Nix introduced the implementation as its first [experimental feature] in 2021. -[experimental feature]: https://nixos.org/manual/nix/unstable/contributing/experimental-features.html +[experimental feature]: https://nix.dev/manual/nix/2.17/contributing/experimental-features.html The subject is considered controversial among Nix users and developers in terms of design, development processes, and community governance. In particular: - The RFC was closed without conclusion, and some design and implementation issues are not yet resolved. Examples include the notion of a global [flake registry], the [impossibility of parameterising flakes](https://github.com/NixOS/nix/issues/2861), and the [new command line interface and flakes being closely tied to each other](https://discourse.nixos.org/t/2023-03-06-nix-team-meeting-minutes-38/26056#cli-stabilisation-announcement-draft-4). -- The original implementation introduced [regressions](https://discourse.nixos.org/t/nix-2-4-and-what-s-next/16257) in the [Nix 2.4 release](https://nixos.org/manual/nix/stable/release-notes/rl-2.4.html), breaking some stable functionality without a [major version](https://semver.org/) increment. +- The original implementation introduced [regressions](https://discourse.nixos.org/t/nix-2-4-and-what-s-next/16257) in the [Nix 2.4 release](https://nix.dev/manual/nix/2.17/release-notes/rl-2.4.html), breaking some stable functionality without a [major version](https://semver.org/) increment. - New Nix users were and still are encouraged by various individuals to adopt flakes despite there being no concrete plan or timeline for stabilisation. -[flake registry]: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-registry.html +[flake registry]: https://nix.dev/manual/nix/2.17/command-ref/new-cli/nix3-registry.html This led to a situation where the stable interface was only sparsely maintained for multiple years, and repeatedly suffered breakages due to ongoing development. Meanwhile, the new interface was adopted widely enough for evolving its design without negatively affecting users to become very challenging. @@ -50,7 +50,7 @@ Both paradigms have their own set of unique concepts and support tooling that ha At the moment, neither the stable nor the experimental interface is clearly superior to the other in all aspects. While flakes reduce complexity in some regards, they also introduce additional mechanisms and you will have to learn more about the system to fully understand how it works. -There are downsides to relying on [experimental features](https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-experimental-features) in general: +There are downsides to relying on [experimental features](https://nix.dev/manual/nix/2.17/command-ref/conf-file.html#conf-experimental-features) in general: - Interfaces and behaviour of experimental features could still be changed by Nix developers. This may require you to adapt your code at some point in the future, which will be more effort when it has grown in complexity. @@ -66,7 +66,7 @@ Yes. There is: - CPU architecture—great effort being made to avoid compilation of native instructions in favour of hardcoded supported ones. - System's current time/date. -- The filesystem used for building (see also [`TMPDIR`](https://nixos.org/manual/nix/stable/command-ref/env-common.html#env-TMPDIR)). +- The filesystem used for building (see also [`TMPDIR`](https://nix.dev/manual/nix/2.17/command-ref/env-common.html#env-TMPDIR)). - Linux kernel parameters, such as: - [IPv6 capabilities](https://github.com/NixOS/nix/issues/5615). - binfmt interpreters, e.g., those configured with [`boot.binfmt.emulatedSystems`](https://search.nixos.org/options?show=boot.binfmt.emulatedSystems). diff --git a/source/concepts/flakes.md b/source/concepts/flakes.md index a8f4f5ec9..84ddcadc2 100644 --- a/source/concepts/flakes.md +++ b/source/concepts/flakes.md @@ -5,25 +5,25 @@ What is usually referred to as "flakes" is: - A policy for managing dependencies between {term}`Nix expressions`. - An [experimental feature] in Nix, implementing that policy and supporting functionality. -[experimental feature]: https://nixos.org/manual/nix/unstable/contributing/experimental-features.html +[experimental feature]: https://nix.dev/manual/nix/2.17/contributing/experimental-features.html -Technically, a [flake](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#description) is a file system tree that contains a file named `flake.nix` in its root directory. +Technically, a [flake](https://nix.dev/manual/nix/2.17/command-ref/new-cli/nix3-flake.html#description) is a file system tree that contains a file named `flake.nix` in its root directory. Flakes add the following behavior to Nix: -1. A `flake.nix` file offers a uniform [schema](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#flake-format) , where: +1. A `flake.nix` file offers a uniform [schema](https://nix.dev/manual/nix/2.17/command-ref/new-cli/nix3-flake.html#flake-format) , where: - Other flakes can be referenced as dependencies providing {term}`Nix language` code or other files. - The values produced by the {term}`Nix expression`s in `flake.nix` are structured according to pre-defined use cases. -1. References to other flakes can be specified using a dedicated [URL-like syntax](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#flake-references). +1. References to other flakes can be specified using a dedicated [URL-like syntax](https://nix.dev/manual/nix/2.17/command-ref/new-cli/nix3-flake.html#flake-references). A [flake registry] allows using symbolic identifiers for further brevity. References can be automatically locked to their current specific version and later updated programmatically. - [flake registry]: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-registry.html + [flake registry]: https://nix.dev/manual/nix/2.17/command-ref/new-cli/nix3-registry.html 1. A [new command line interface], implemented as a separate experimental feature, leverages flakes by accepting flake references in order to build, run, or deploy software defined as a flake. - [new command line interface]: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix.html + [new command line interface]: https://nix.dev/manual/nix/2.17/command-ref/new-cli/nix.html Nix handles flakes differently than regular {term}`Nix file`s in the following ways: diff --git a/source/guides/best-practices.md b/source/guides/best-practices.md index 9ac331b80..6c521156d 100644 --- a/source/guides/best-practices.md +++ b/source/guides/best-practices.md @@ -117,7 +117,7 @@ You will often encounter Nix language code samples that refer to ``. `<...>` is special syntax that was [introduced in 2011] to conveniently access values from the environment variable [`$NIX_PATH`]. [introduced in 2011]: https://github.com/NixOS/nix/commit/1ecc97b6bdb27e56d832ca48cdafd3dbb5185a04 -[`$NIX_PATH`]: https://nixos.org/manual/nix/unstable/command-ref/env-common.html#env-NIX_PATH +[`$NIX_PATH`]: https://nix.dev/manual/nix/2.17/command-ref/env-common.html#env-NIX_PATH This means, the value of a search path depends on external system state. When using search paths, the same Nix expression can produce different results. @@ -125,7 +125,7 @@ When using search paths, the same Nix expression can produce different results. In most cases, `$NIX_PATH` is set to the latest channel when Nix is installed, and is therefore likely to differ from machine to machine. :::{note} -[Channels](https://nixos.org/manual/nix/stable/command-ref/nix-channel.html) are a mechanism for referencing remote Nix expressions and retrieving their latest version. +[Channels](https://nix.dev/manual/nix/2.17/command-ref/nix-channel.html) are a mechanism for referencing remote Nix expressions and retrieving their latest version. ::: The state of a subscribed channel is external to the Nix expressions relying on it. @@ -182,7 +182,7 @@ We skip it in minimal examples reduce distractions. ## Updating nested attribute sets -The [attribute set update operator](https://nixos.org/manual/nix/stable/language/operators.html#update) merges two attribute sets. +The [attribute set update operator](https://nix.dev/manual/nix/2.17/language/operators.html#update) merges two attribute sets. Example: @@ -248,7 +248,7 @@ If someone builds the project in a directory with a different name, they will ge This can be the cause of needless rebuilds. :::{tip} -Use [`builtins.path`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-path) with the `name` attribute set to something fixed. +Use [`builtins.path`](https://nix.dev/manual/nix/2.17/language/builtins.html#builtins-path) with the `name` attribute set to something fixed. This will derive the symbolic name of the store path from `name` instead of the working directory: diff --git a/source/guides/troubleshooting.md b/source/guides/troubleshooting.md index 35170fcd8..78ebc8fa7 100644 --- a/source/guides/troubleshooting.md +++ b/source/guides/troubleshooting.md @@ -2,7 +2,7 @@ ## What to do if a binary cache is down or unreachable? -Pass [`--option substitute false`](https://nixos.org/manual/nix/stable/command-ref/conf-file#conf-substitute) to Nix commands. +Pass [`--option substitute false`](https://nix.dev/manual/nix/2.17/command-ref/conf-file#conf-substitute) to Nix commands. ### How to fix: `error: querying path in database: database disk image is malformed` @@ -13,7 +13,7 @@ Try: $ sqlite3 /nix/var/nix/db/db.sqlite "pragma integrity_check" ``` -Which will print the errors in the [database](https://nixos.org/manual/nix/stable/glossary#gloss-nix-database). +Which will print the errors in the [database](https://nix.dev/manual/nix/2.17/glossary#gloss-nix-database). If the errors are due to missing references, the following may work: ```shell-session @@ -25,7 +25,7 @@ $ sqlite3 /nix/var/nix/db/db.sqlite-bkp ".dump" | sqlite3 /nix/var/nix/db/db.sql This is a [known issue](https://github.com/NixOS/nix/issues/1251). -It means that using a new version of Nix upgraded the SQLite schema of the [database](https://nixos.org/manual/nix/stable/glossary#gloss-nix-database), and then you tried to use an older version Nix. +It means that using a new version of Nix upgraded the SQLite schema of the [database](https://nix.dev/manual/nix/2.17/glossary#gloss-nix-database), and then you tried to use an older version Nix. The solution is to dump the database, use the old Nix version to initialize it, and then re-import the data: @@ -39,6 +39,6 @@ $ nix-store --load-db < /tmp/db.dump ### How to fix: `writing to file: Connection reset by peer` -This may mean you are trying to import a too large file or directory into the [Nix store](https://nixos.org/manual/nix/stable/glossary#gloss-store), or your machine is running out of resources, such as disk space or memory. +This may mean you are trying to import a too large file or directory into the [Nix store](https://nix.dev/manual/nix/2.17/glossary#gloss-store), or your machine is running out of resources, such as disk space or memory. -Try to reduce the size of the directory to import, or run [garbage collection](https://nixos.org/manual/nix/stable/command-ref/nix-collect-garbage). +Try to reduce the size of the directory to import, or run [garbage collection](https://nix.dev/manual/nix/2.17/command-ref/nix-collect-garbage). diff --git a/source/install-nix.md b/source/install-nix.md index 3ab6e3281..caf13465f 100644 --- a/source/install-nix.md +++ b/source/install-nix.md @@ -81,5 +81,5 @@ $ nix --version nix (Nix) 2.11.0 ``` -[multi-user installation]: https://nixos.org/manual/nix/stable/installation/multi-user.html -[single-user installation]: https://nixos.org/manual/nix/stable/installation/single-user.html +[multi-user installation]: https://nix.dev/manual/nix/2.17/installation/multi-user.html +[single-user installation]: https://nix.dev/manual/nix/2.17/installation/single-user.html diff --git a/source/reference/glossary.md b/source/reference/glossary.md index 43e75bf70..a6305d4f7 100644 --- a/source/reference/glossary.md +++ b/source/reference/glossary.md @@ -16,7 +16,7 @@ Nix language :::{seealso} - [](reading-nix-language) - - [Nix language reference](https://nixos.org/manual/nix/stable/language) + - [Nix language reference](https://nix.dev/manual/nix/2.17/language) ::: Nix expression diff --git a/source/reference/nix-manual.md b/source/reference/nix-manual.md index 229c5fda7..35cf68e5e 100644 --- a/source/reference/nix-manual.md +++ b/source/reference/nix-manual.md @@ -5,16 +5,16 @@ :hidden: Nix development (master) -Nix 2.18 (latest release) +Nix 2.18 (latest release) Nix 2.17 (Nixpkgs unstable) -Nix 2.13 (NixOS 23.05) +Nix 2.13 (NixOS 23.05) ``` - [Nix development](https://hydra.nixos.org/job/nix/master/build.x86_64-linux/latest/download) The latest working build from the `master` branch of the [Nix repository](https://github.com/NixOS/nix) -- [Nix 2.18](https://nix.dev/manual/nix/2.18/) +- [Nix 2.18](https://nix.dev/manual/nix/2.17/) The latest Nix release @@ -22,6 +22,6 @@ Nix 2.13 (NixOS 23.05) The Nix version shipped with Nixpkgs unstable -- [Nix 2.13 ](https://nix.dev/manual/nix/2.13/) +- [Nix 2.13](https://nix.dev/manual/nix/2.13/) The Nix version shipped with NixOS 23.05 diff --git a/source/reference/pinning-nixpkgs.md b/source/reference/pinning-nixpkgs.md index 723a20fd5..64647fcfc 100644 --- a/source/reference/pinning-nixpkgs.md +++ b/source/reference/pinning-nixpkgs.md @@ -4,9 +4,9 @@ Specifying remote Nix expressions, such as the one provided by Nixpkgs, can be done in several ways: -- [`$NIX_PATH` environment variable](https://nixos.org/manual/nix/stable/command-ref/env-common.html#env-NIX_PATH) -- [`-I` option](https://nixos.org/manual/nix/stable/command-ref/opt-common.html#opt-I) to most of commands like `nix-build`, `nix-shell`, etc. -- [`fetchurl`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchurl), [`fetchTarball`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchTarball), [`fetchGit`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchGit) or [Nixpkgs fetchers](https://nixos.org/manual/nixpkgs/stable/#chap-pkgs-fetchers) in Nix expressions +- [`$NIX_PATH` environment variable](https://nix.dev/manual/nix/2.17/command-ref/env-common.html#env-NIX_PATH) +- [`-I` option](https://nix.dev/manual/nix/2.17/command-ref/opt-common.html#opt-I) to most of commands like `nix-build`, `nix-shell`, etc. +- [`fetchurl`](https://nix.dev/manual/nix/2.17/language/builtins.html#builtins-fetchurl), [`fetchTarball`](https://nix.dev/manual/nix/2.17/language/builtins.html#builtins-fetchTarball), [`fetchGit`](https://nix.dev/manual/nix/2.17/language/builtins.html#builtins-fetchGit) or [Nixpkgs fetchers](https://nixos.org/manual/nixpkgs/stable/#chap-pkgs-fetchers) in Nix expressions ## Possible URL values diff --git a/source/tutorials/first-steps/ad-hoc-shell-environments.md b/source/tutorials/first-steps/ad-hoc-shell-environments.md index 74afebe40..d132fd579 100644 --- a/source/tutorials/first-steps/ad-hoc-shell-environments.md +++ b/source/tutorials/first-steps/ad-hoc-shell-environments.md @@ -181,8 +181,8 @@ There are three things going on here: ## References -- [Nix manual: `nix-shell`](https://nixos.org/manual/nix/stable/command-ref/nix-shell) (or run `man nix-shell`) -- [Nix manual: `-I` option](https://nixos.org/manual/nix/unstable/command-ref/opt-common.html#opt-I) +- [Nix manual: `nix-shell`](https://nix.dev/manual/nix/2.17/command-ref/nix-shell) (or run `man nix-shell`) +- [Nix manual: `-I` option](https://nix.dev/manual/nix/2.17/command-ref/opt-common.html#opt-I) ## Next steps diff --git a/source/tutorials/first-steps/declarative-shell.md b/source/tutorials/first-steps/declarative-shell.md index bda4a91ef..218ca8e11 100644 --- a/source/tutorials/first-steps/declarative-shell.md +++ b/source/tutorials/first-steps/declarative-shell.md @@ -165,5 +165,5 @@ Set `shellHook` to output the current repository status: - [`mkShell` documentation](https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-mkShell) - Nixpkgs [shell functions and utilities](https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-functions) documentation -- [`nix-shell` documentation](https://nixos.org/manual/nix/stable/command-ref/nix-shell) +- [`nix-shell` documentation](https://nix.dev/manual/nix/2.17/command-ref/nix-shell) diff --git a/source/tutorials/first-steps/reproducible-scripts.md b/source/tutorials/first-steps/reproducible-scripts.md index da7659576..7c6389eae 100644 --- a/source/tutorials/first-steps/reproducible-scripts.md +++ b/source/tutorials/first-steps/reproducible-scripts.md @@ -47,10 +47,10 @@ It takes the following parameters relevant for our use case: - `-p` lists packages that should be present in the interpreter's environment - `-I` explicitly sets [the search path] for packages -More details on the options can be found in the [`nix-shell` reference documentation](https://nixos.org/manual/nix/stable/command-ref/nix-shell.html#options). +More details on the options can be found in the [`nix-shell` reference documentation](https://nix.dev/manual/nix/2.17/command-ref/nix-shell.html#options). -[`nix-shell` as a shebang interpreter]: https://nixos.org/manual/nix/stable/command-ref/nix-shell.html#use-as-a--interpreter -[the search path]: https://nixos.org/manual/nix/unstable/command-ref/opt-common.html#opt-I +[`nix-shell` as a shebang interpreter]: https://nix.dev/manual/nix/2.17/command-ref/nix-shell.html#use-as-a--interpreter +[the search path]: https://nix.dev/manual/nix/2.17/command-ref/opt-common.html#opt-I Create a file named `nixpkgs-releases.sh` with the following content: @@ -92,4 +92,4 @@ Run the script: - {ref}`reading-nix-language` to learn about the Nix language, which is used to declare packages and configurations. - {ref}`declarative-reproducible-envs` to create reproducible shell environments with a declarative configuration file. -- [Garbage Collection](https://nixos.org/manual/nix/stable/package-management/garbage-collection.html) – free up storage used by the programs made available through Nix +- [Garbage Collection](https://nix.dev/manual/nix/2.17/package-management/garbage-collection.html) – free up storage used by the programs made available through Nix diff --git a/source/tutorials/nix-language.md b/source/tutorials/nix-language.md index b83400ad8..8c7793466 100644 --- a/source/tutorials/nix-language.md +++ b/source/tutorials/nix-language.md @@ -64,7 +64,7 @@ This tutorial *does not* explain all Nix language features in detail and *does n See the [Nix manual][manual-language] for a full language reference. ::: -[manual-language]: https://nixos.org/manual/nix/stable/language/index.html +[manual-language]: https://nix.dev/manual/nix/2.17/language/index.html ### What do you need? @@ -139,7 +139,7 @@ Type `:q` to exit [`nix repl`]. ::: -[`nix repl`]: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-repl.html +[`nix repl`]: https://nix.dev/manual/nix/2.17/command-ref/new-cli/nix3-repl.html #### Evaluating Nix files @@ -201,7 +201,7 @@ $ nix-instantiate --eval --strict file.nix ::: -[nix-instantiate]: https://nixos.org/manual/nix/stable/command-ref/nix-instantiate.html +[nix-instantiate]: https://nix.dev/manual/nix/2.17/command-ref/nix-instantiate.html ### Notes on whitespace @@ -314,8 +314,8 @@ Nix language data types *without functions* work just like their counterparts in - List elements are separated by white space.[^list-whitespace] ::: -[^attrnames]: Details: [Nix manual - attribute set](https://nixos.org/manual/nix/stable/language/values.html#attribute-set) -[^list-whitespace]: Details: [Nix manual - list](https://nixos.org/manual/nix/stable/language/values.html#list) +[^attrnames]: Details: [Nix manual - attribute set](https://nix.dev/manual/nix/2.17/language/values.html#attribute-set) +[^list-whitespace]: Details: [Nix manual - list](https://nix.dev/manual/nix/2.17/language/values.html#list) (rec-attrset)= #### Recursive attribute set `rec { ... }` @@ -971,9 +971,9 @@ For example, `` points to the subdirectory `lib` of that file syste While you will encounter many such examples, we recommend to [avoid search paths](search-path) in production code, as they are [impurities](impurities) which are not reproducible. -[NIX_PATH]: https://nixos.org/manual/nix/unstable/command-ref/env-common.html?highlight=nix_path#env-NIX_PATH +[NIX_PATH]: https://nix.dev/manual/nix/2.17/command-ref/env-common.html?highlight=nix_path#env-NIX_PATH [nixpkgs]: https://github.com/NixOS/nixpkgs -[manual-primitives]: https://nixos.org/manual/nix/stable/language/values.html#primitives +[manual-primitives]: https://nix.dev/manual/nix/2.17/language/values.html#primitives (indented-strings)= ### Indented strings @@ -1480,7 +1480,7 @@ You need to know about both to understand and navigate Nix language code. We recommend to at least skim them to familiarise yourself with what is available. -[operators]: https://nixos.org/manual/nix/stable/language/operators.html +[operators]: https://nix.dev/manual/nix/2.17/language/operators.html (builtins)= ### `builtins` @@ -1508,8 +1508,8 @@ builtins.toString ``` -[nix-operators]: https://nixos.org/manual/nix/unstable/language/operators.html -[nix-builtins]: https://nixos.org/manual/nix/stable/language/builtins.html +[nix-operators]: https://nix.dev/manual/nix/2.17/language/operators.html +[nix-builtins]: https://nix.dev/manual/nix/2.17/language/builtins.html #### `import` @@ -1755,7 +1755,7 @@ The only way to specify build inputs in the Nix language is explicitly with: Nix and the Nix language refer to files by their content hash. If file contents are not known in advance, it's unavoidable to read files during expression evaluation. :::{note} -Nix supports other types of impure expressions, such as [search paths](search-path) or the constant [`builtins.currentSystem`](https://nixos.org/manual/nix/stable/language/builtin-constants.html#builtins-currentSystem). +Nix supports other types of impure expressions, such as [search paths](search-path) or the constant [`builtins.currentSystem`](https://nix.dev/manual/nix/2.17/language/builtin-constants.html#builtins-currentSystem). We do not cover those here in more detail, as they do not matter for how the Nix language works in principle, and because they are discouraged for the very reason of breaking reproducibility. ::: @@ -1811,10 +1811,10 @@ Files to be used as build inputs do not have to come from the file system. The Nix language provides built-in impure functions to fetch files over the network during evaluation: -- [`builtins.fetchurl`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchurl) -- [`builtins.fetchTarball`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchTarball) -- [`builtins.fetchGit`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchGit) -- [`builtins.fetchClosure`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchClosure) +- [`builtins.fetchurl`](https://nix.dev/manual/nix/2.17/language/builtins.html#builtins-fetchurl) +- [`builtins.fetchTarball`](https://nix.dev/manual/nix/2.17/language/builtins.html#builtins-fetchTarball) +- [`builtins.fetchGit`](https://nix.dev/manual/nix/2.17/language/builtins.html#builtins-fetchGit) +- [`builtins.fetchClosure`](https://nix.dev/manual/nix/2.17/language/builtins.html#builtins-fetchClosure) These functions evaluate to a file system path in the Nix store. @@ -2029,14 +2029,14 @@ Explanation: - [Nixpkgs manual: Functions reference][nixpkgs-functions] - [Nixpkgs manual: Fetchers][nixpkgs-fetchers] -[manual-string-interpolation]: https://nixos.org/manual/nix/stable/language/string-interpolation.html +[manual-string-interpolation]: https://nix.dev/manual/nix/2.17/language/string-interpolation.html ## Next steps ### Get things done - [](declarative-reproducible-envs) – create reproducible shell environments from a Nix file -- [Garbage Collection](https://nixos.org/manual/nix/stable/package-management/garbage-collection.html) – remove unused build results from the Nix store +- [Garbage Collection](https://nix.dev/manual/nix/2.17/package-management/garbage-collection.html) – remove unused build results from the Nix store ### Learn more diff --git a/source/tutorials/nixos/deploying-nixos-using-terraform.md b/source/tutorials/nixos/deploying-nixos-using-terraform.md index f1b5de502..95c021d39 100644 --- a/source/tutorials/nixos/deploying-nixos-using-terraform.md +++ b/source/tutorials/nixos/deploying-nixos-using-terraform.md @@ -160,7 +160,7 @@ $ terraform apply ## Caveats - The `deploy_nixos` module requires NixOS to be installed on the target machine and Nix on the host machine. -- The `deploy_nixos` module doesn't work when the client and target architectures are different (unless you use [distributed builds](https://nixos.org/manual/nix/unstable/advanced-topics/distributed-builds.html)). +- The `deploy_nixos` module doesn't work when the client and target architectures are different (unless you use [distributed builds](https://nix.dev/manual/nix/2.17/advanced-topics/distributed-builds.html)). - If you need to inject a value into Nix, there is no elegant solution. - Each machine is evaluated separately, so note that your memory requirements will grow linearly with the number of machines. diff --git a/source/tutorials/nixos/nixos-configuration-on-vm.md b/source/tutorials/nixos/nixos-configuration-on-vm.md index 5d4109546..7eff8b677 100644 --- a/source/tutorials/nixos/nixos-configuration-on-vm.md +++ b/source/tutorials/nixos/nixos-configuration-on-vm.md @@ -17,7 +17,7 @@ Virtual machines are a practical tool for debugging NixOS configurations. ## What do you need? -- A working [Nix installation](https://nixos.org/manual/nix/stable/installation/installation.html) on Linux, or [NixOS](https://nixos.org/manual/nixos/stable/index.html#sec-installation), with a graphical environment +- A working [Nix installation](https://nix.dev/manual/nix/2.17/installation/installation.html) on Linux, or [NixOS](https://nixos.org/manual/nixos/stable/index.html#sec-installation), with a graphical environment - Basic knowledge of the [Nix language](reading-nix-language) ## Starting from the default NixOS configuration @@ -139,17 +139,17 @@ This command builds the attribute `vm` from the `nixos-22.11` release of NixOS,
Detailed explanation -- The positional argument to [`nix-build`](https://nixos.org/manual/nix/stable/command-ref/nix-build.html) is a path to the derivation to be built. +- The positional argument to [`nix-build`](https://nix.dev/manual/nix/2.17/command-ref/nix-build.html) is a path to the derivation to be built. That path can be obtained from [a Nix expression that evaluates to a derivation](derivations). The virtual machine build helper is defined in NixOS, which is part of the [`nixpkgs` repository](https://github.com/NixOS/nixpkgs). Therefore we use the [lookup path](search-path-tutorial) ``. -- The [`-A` option](https://nixos.org/manual/nix/stable/command-ref/opt-common.html#opt-attr) specifies the attribute to pick from the provided Nix expression ``. +- The [`-A` option](https://nix.dev/manual/nix/2.17/command-ref/opt-common.html#opt-attr) specifies the attribute to pick from the provided Nix expression ``. To build the virtual machine, we choose the `vm` attribute as defined in [`nixos/default.nix`](https://github.com/NixOS/nixpkgs/blob/7c164f4bea71d74d98780ab7be4f9105630a2eba/nixos/default.nix#L19). -- The [`-I` option](https://nixos.org/manual/nix/stable/command-ref/opt-common.html#opt-I) prepends entries to the search path. +- The [`-I` option](https://nix.dev/manual/nix/2.17/command-ref/opt-common.html#opt-I) prepends entries to the search path. Here we set `nixpkgs` to refer to a [specific version of Nixpkgs](ref-pinning-nixpkgs) and set `nix-config` to the `configuration.nix` file in the current directory. @@ -207,6 +207,6 @@ rm nixos.qcow2 - [NixOS Manual: Changing the configuration](https://nixos.org/manual/nixos/stable/#sec-changing-config). - [NixOS source code: `configuration template` in `tools.nix`](https://github.com/NixOS/nixpkgs/blob/4e0525a8cdb370d31c1e1ba2641ad2a91fded57d/nixos/modules/installer/tools/tools.nix#L122-L226). - [NixOS source code: `vm` attribute in `default.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/default.nix). -- [Nix manual: `nix-build`](https://nixos.org/manual/nix/stable/command-ref/nix-build.html). -- [Nix manual: common command-line options](https://nixos.org/manual/nix/stable/command-ref/opt-common.html). -- [Nix manual: `NIX_PATH` environment variable](https://nixos.org/manual/nix/stable/command-ref/env-common.html#env-NIX_PATH). +- [Nix manual: `nix-build`](https://nix.dev/manual/nix/2.17/command-ref/nix-build.html). +- [Nix manual: common command-line options](https://nix.dev/manual/nix/2.17/command-ref/opt-common.html). +- [Nix manual: `NIX_PATH` environment variable](https://nix.dev/manual/nix/2.17/command-ref/env-common.html#env-NIX_PATH). diff --git a/source/tutorials/packaging-existing-software.md b/source/tutorials/packaging-existing-software.md index e732a6d93..2437c076c 100644 --- a/source/tutorials/packaging-existing-software.md +++ b/source/tutorials/packaging-existing-software.md @@ -85,7 +85,7 @@ error: cannot evaluate a function that has an argument without a value ('lib') Nix attempted to evaluate a function as a top level expression; in this case it must have its arguments supplied either by default values, or passed explicitly with '--arg' or '--argstr'. See - https://nixos.org/manual/nix/stable/language/constructs.html#functions. + https://nix.dev/manual/nix/2.17/language/constructs.html#functions. at /home/nix-user/hello.nix:2:3: