diff --git a/default.nix b/default.nix index 63b37a48d..9dd9b8772 100644 --- a/default.nix +++ b/default.nix @@ -1,7 +1,7 @@ { inputs ? import ./nix/inputs.nix, system ? builtins.currentSystem, - pkgs ? import inputs.nixpkgs."23.05" { + pkgs ? import inputs.nixpkgs."25.05" { config = { }; overlays = [ (import ./nix/overlay.nix) ]; inherit system; @@ -21,7 +21,7 @@ let pkgs.stdenv.mkDerivation { name = "nix-dev"; src = ./.; - nativeBuildInputs = with pkgs.python310.pkgs; [ + nativeBuildInputs = with pkgs.python3.pkgs; [ linkify-it-py myst-parser sphinx @@ -36,7 +36,7 @@ let let substitutedNixManualReference = pkgs.substitute { src = ./source/reference/nix-manual.md; - replacements = lib.concatLists (lib.mapAttrsToList (from: to: [ "--subst-var-by" from to ]) releases.substitutions); + substitutions = lib.concatLists (lib.mapAttrsToList (from: to: [ "--subst-var-by" from to ]) releases.substitutions); }; in '' @@ -92,7 +92,7 @@ in update-nix-releases update-nixpkgs-releases pkgs.npins - pkgs.python310.pkgs.black + pkgs.python3.pkgs.black pkgs.vale pkgs.netlify-cli ]; diff --git a/maintainers/google-season-of-docs-2024.md b/maintainers/google-season-of-docs-2024.md index 186a567bd..e6241a6e8 100644 --- a/maintainers/google-season-of-docs-2024.md +++ b/maintainers/google-season-of-docs-2024.md @@ -1,4 +1,4 @@ -# Google Season of Docs 2024: write Nix docker and cross compilation guides +# Google season of docs 2024: write Nix docker and cross compilation guides ## About Nix diff --git a/nix/default.nix b/nix/default.nix new file mode 100644 index 000000000..659247626 --- /dev/null +++ b/nix/default.nix @@ -0,0 +1,146 @@ +/* + This file is provided under the MIT licence: + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +# Generated by npins. Do not modify; will be overwritten regularly +let + data = builtins.fromJSON (builtins.readFile ./sources.json); + version = data.version; + + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 + range = + first: last: if first > last then [ ] else builtins.genList (n: first + n) (last - first + 1); + + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 + stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); + + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269 + stringAsChars = f: s: concatStrings (map f (stringToCharacters s)); + concatMapStrings = f: list: concatStrings (map f list); + concatStrings = builtins.concatStringsSep ""; + + # If the environment variable NPINS_OVERRIDE_${name} is set, then use + # the path directly as opposed to the fetched source. + # (Taken from Niv for compatibility) + mayOverride = + name: path: + let + envVarName = "NPINS_OVERRIDE_${saneName}"; + saneName = stringAsChars (c: if (builtins.match "[a-zA-Z0-9]" c) == null then "_" else c) name; + ersatz = builtins.getEnv envVarName; + in + if ersatz == "" then + path + else + # this turns the string into an actual Nix path (for both absolute and + # relative paths) + builtins.trace "Overriding path of \"${name}\" with \"${ersatz}\" due to set \"${envVarName}\"" ( + if builtins.substring 0 1 ersatz == "/" then + /. + ersatz + else + /. + builtins.getEnv "PWD" + "/${ersatz}" + ); + + mkSource = + name: spec: + assert spec ? type; + let + path = + if spec.type == "Git" then + mkGitSource spec + else if spec.type == "GitRelease" then + mkGitSource spec + else if spec.type == "PyPi" then + mkPyPiSource spec + else if spec.type == "Channel" then + mkChannelSource spec + else if spec.type == "Tarball" then + mkTarballSource spec + else + builtins.throw "Unknown source type ${spec.type}"; + in + spec // { outPath = mayOverride name path; }; + + mkGitSource = + { + repository, + revision, + url ? null, + submodules, + hash, + branch ? null, + ... + }: + assert repository ? type; + # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository + # In the latter case, there we will always be an url to the tarball + if url != null && !submodules then + builtins.fetchTarball { + inherit url; + sha256 = hash; # FIXME: check nix version & use SRI hashes + } + else + let + url = + if repository.type == "Git" then + repository.url + else if repository.type == "GitHub" then + "https://github.com/${repository.owner}/${repository.repo}.git" + else if repository.type == "GitLab" then + "${repository.server}/${repository.repo_path}.git" + else + throw "Unrecognized repository type ${repository.type}"; + urlToName = + url: rev: + let + matched = builtins.match "^.*/([^/]*)(\\.git)?$" url; + + short = builtins.substring 0 7 rev; + + appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; + in + "${if matched == null then "source" else builtins.head matched}${appendShort}"; + name = urlToName url revision; + in + builtins.fetchGit { + rev = revision; + inherit name; + # hash = hash; + inherit url submodules; + }; + + mkPyPiSource = + { url, hash, ... }: + builtins.fetchurl { + inherit url; + sha256 = hash; + }; + + mkChannelSource = + { url, hash, ... }: + builtins.fetchTarball { + inherit url; + sha256 = hash; + }; + + mkTarballSource = + { + url, + locked_url ? url, + hash, + ... + }: + builtins.fetchTarball { + url = locked_url; + sha256 = hash; + }; +in +if version == 5 then + builtins.mapAttrs mkSource data.pins +else + throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" diff --git a/nix/inputs.nix b/nix/inputs.nix index c51bd0e3b..d09a1a85c 100644 --- a/nix/inputs.nix +++ b/nix/inputs.nix @@ -5,7 +5,7 @@ # { # = ; # } - main = import ../npins { }; + main = import ../npins; # Sources for Nix releases, the attribute name is the release version. # These are done specially because updating these is non-trivial. @@ -26,8 +26,14 @@ # Sources for Nixpkgs releases, the attribute name is the release name. # These can be updated with the standard npins tooling, but are tracked separately to avoid having to filter them out during processing. # See ./update-nixpkgs-releases.nix - nixpkgs = import ../npins { - json = ./sources.json; - }; + nixpkgs = + builtins.mapAttrs (name: value: + # This matches the nix-prefetch-url --unpack --name source call in ./update-nix-releases.nix + fetchTarball { + name = "source"; + url = value.url; + sha256 = value.hash; + } + ) (builtins.fromJSON (builtins.readFile ./sources.json)).pins; } diff --git a/nix/sources.json b/nix/sources.json index 292b765b7..2ffda9b95 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,113 +1,5 @@ { "pins": { - "18.09": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nixos", - "repo": "nixpkgs" - }, - "branch": "nixos-18.09", - "revision": "a7e559a5504572008567383c3dc8e142fa7a8633", - "url": "https://github.com/nixos/nixpkgs/archive/a7e559a5504572008567383c3dc8e142fa7a8633.tar.gz", - "hash": "16j95q58kkc69lfgpjkj76gw5sx8rcxwi3civm0mlfaxxyw9gzp6" - }, - "19.03": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nixos", - "repo": "nixpkgs" - }, - "branch": "nixos-19.03", - "revision": "34c7eb7545d155cc5b6f499b23a7cb1c96ab4d59", - "url": "https://github.com/nixos/nixpkgs/archive/34c7eb7545d155cc5b6f499b23a7cb1c96ab4d59.tar.gz", - "hash": "11z6ajj108fy2q5g8y4higlcaqncrbjm3dnv17pvif6avagw4mcb" - }, - "19.09": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nixos", - "repo": "nixpkgs" - }, - "branch": "nixos-19.09", - "revision": "75f4ba05c63be3f147bcc2f7bd4ba1f029cedcb1", - "url": "https://github.com/nixos/nixpkgs/archive/75f4ba05c63be3f147bcc2f7bd4ba1f029cedcb1.tar.gz", - "hash": "157c64220lf825ll4c0cxsdwg7cxqdx4z559fdp7kpz0g6p8fhhr" - }, - "20.03": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nixos", - "repo": "nixpkgs" - }, - "branch": "nixos-20.03", - "revision": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", - "url": "https://github.com/nixos/nixpkgs/archive/1db42b7fe3878f3f5f7a4f2dc210772fd080e205.tar.gz", - "hash": "05k9y9ki6jhaqdhycnidnk5zrdzsdammbk5lsmsbz249hjhhgcgh" - }, - "20.09": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nixos", - "repo": "nixpkgs" - }, - "branch": "nixos-20.09", - "revision": "1c1f5649bb9c1b0d98637c8c365228f57126f361", - "url": "https://github.com/nixos/nixpkgs/archive/1c1f5649bb9c1b0d98637c8c365228f57126f361.tar.gz", - "hash": "0f2nvdijyxfgl5kwyb4465pppd5vkhqxddx6v40k2s0z9jfhj0xl" - }, - "21.05": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nixos", - "repo": "nixpkgs" - }, - "branch": "nixos-21.05", - "revision": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", - "url": "https://github.com/nixos/nixpkgs/archive/022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf.tar.gz", - "hash": "12q00nbd7fb812zchbcnmdg3pw45qhxm74hgpjmshc2dfmgkjh4n" - }, - "21.11": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nixos", - "repo": "nixpkgs" - }, - "branch": "nixos-21.11", - "revision": "eabc38219184cc3e04a974fe31857d8e0eac098d", - "url": "https://github.com/nixos/nixpkgs/archive/eabc38219184cc3e04a974fe31857d8e0eac098d.tar.gz", - "hash": "04ffwp2gzq0hhz7siskw6qh9ys8ragp7285vi1zh8xjksxn1msc5" - }, - "22.05": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nixos", - "repo": "nixpkgs" - }, - "branch": "nixos-22.05", - "revision": "380be19fbd2d9079f677978361792cb25e8a3635", - "url": "https://github.com/nixos/nixpkgs/archive/380be19fbd2d9079f677978361792cb25e8a3635.tar.gz", - "hash": "154x9swf494mqwi4z8nbq2f0sp8pwp4fvx51lqzindjfbb9yxxv5" - }, - "22.11": { - "type": "Git", - "repository": { - "type": "GitHub", - "owner": "nixos", - "repo": "nixpkgs" - }, - "branch": "nixos-22.11", - "revision": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b", - "url": "https://github.com/nixos/nixpkgs/archive/ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b.tar.gz", - "hash": "1xi53rlslcprybsvrmipm69ypd3g3hr7wkxvzc73ag8296yclyll" - }, "23.05": { "type": "Git", "repository": { @@ -116,6 +8,7 @@ "repo": "nixpkgs" }, "branch": "nixos-23.05", + "submodules": false, "revision": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", "url": "https://github.com/nixos/nixpkgs/archive/70bdadeb94ffc8806c0570eb5c2695ad29f0e421.tar.gz", "hash": "05cbl1k193c9la9xhlz4y6y8ijpb2mkaqrab30zij6z4kqgclsrd" @@ -128,6 +21,7 @@ "repo": "nixpkgs" }, "branch": "nixos-23.11", + "submodules": false, "revision": "205fd4226592cc83fd4c0885a3e4c9c400efabb5", "url": "https://github.com/nixos/nixpkgs/archive/205fd4226592cc83fd4c0885a3e4c9c400efabb5.tar.gz", "hash": "1f5d2g1p6nfwycpmrnnmc2xmcszp804adp16knjvdkj8nz36y1fg" @@ -140,6 +34,7 @@ "repo": "nixpkgs" }, "branch": "nixos-24.05", + "submodules": false, "revision": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", "url": "https://github.com/nixos/nixpkgs/archive/b134951a4c9f3c995fd7be05f3243f8ecd65d798.tar.gz", "hash": "0zydsqiaz8qi4zd63zsb2gij2p614cgkcaisnk11wjy3nmiq0x1s" @@ -152,11 +47,24 @@ "repo": "nixpkgs" }, "branch": "nixos-24.11", - "revision": "62c435d93bf046a5396f3016472e8f7c8e2aed65", - "url": "https://github.com/nixos/nixpkgs/archive/62c435d93bf046a5396f3016472e8f7c8e2aed65.tar.gz", - "hash": "0zpvadqbs19jblnd0j2rfs9m7j0n5spx0vilq8907g2gqrx63fqp" + "submodules": false, + "revision": "2baa12ff69913392faf0ace833bc54bba297ea95", + "url": "https://github.com/nixos/nixpkgs/archive/2baa12ff69913392faf0ace833bc54bba297ea95.tar.gz", + "hash": "0b98zjp4klps935sch2n0mysfr3l9sz13d2r74dsgnsnklsxm0ak" + }, + "25.05": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nixos", + "repo": "nixpkgs" + }, + "branch": "nixos-25.05", + "submodules": false, + "revision": "55d1f923c480dadce40f5231feb472e81b0bab48", + "url": "https://github.com/nixos/nixpkgs/archive/55d1f923c480dadce40f5231feb472e81b0bab48.tar.gz", + "hash": "0i0ayb1p7ypbjnjf837qlfn6n3i3468cvalha54yakjdi6a6srnb" } }, - "version": 3 + "version": 5 } - diff --git a/nix/update-nixpkgs-releases.nix b/nix/update-nixpkgs-releases.nix index 8a815ce60..23298a99d 100644 --- a/nix/update-nixpkgs-releases.nix +++ b/nix/update-nixpkgs-releases.nix @@ -22,8 +22,16 @@ writeShellApplication { | rg '^([0-9a-f]+)\trefs/heads/nixos-(\d\d\.\d\d)$' -or '$2' \ | sort --reverse --version-sort \ | while read -r version; do + major_version=$(echo "$version" | cut -d. -f1) + # filter out very old nixpkgs versions + if [ "$major_version" -lt 23 ]; then + if npins -d nix show | grep -q "$version"; then + npins -d nix remove "$version" + fi + continue + fi - if ! jq -e --arg version "$version" 'has($ARGS.named.version)' nix/sources.json >/dev/null; then + if ! npins -d nix show | grep -q "$version"; then npins -d nix add --name "$version" github nixos nixpkgs --branch "nixos-$version" fi done diff --git a/npins/default.nix b/npins/default.nix index 2cb9913b3..659247626 100644 --- a/npins/default.nix +++ b/npins/default.nix @@ -1,11 +1,53 @@ +/* + This file is provided under the MIT licence: + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ # Generated by npins. Do not modify; will be overwritten regularly -{ json ? ./sources.json }: let - data = builtins.fromJSON (builtins.readFile json); + data = builtins.fromJSON (builtins.readFile ./sources.json); version = data.version; + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 + range = + first: last: if first > last then [ ] else builtins.genList (n: first + n) (last - first + 1); + + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 + stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); + + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269 + stringAsChars = f: s: concatStrings (map f (stringToCharacters s)); + concatMapStrings = f: list: concatStrings (map f list); + concatStrings = builtins.concatStringsSep ""; + + # If the environment variable NPINS_OVERRIDE_${name} is set, then use + # the path directly as opposed to the fetched source. + # (Taken from Niv for compatibility) + mayOverride = + name: path: + let + envVarName = "NPINS_OVERRIDE_${saneName}"; + saneName = stringAsChars (c: if (builtins.match "[a-zA-Z0-9]" c) == null then "_" else c) name; + ersatz = builtins.getEnv envVarName; + in + if ersatz == "" then + path + else + # this turns the string into an actual Nix path (for both absolute and + # relative paths) + builtins.trace "Overriding path of \"${name}\" with \"${ersatz}\" due to set \"${envVarName}\"" ( + if builtins.substring 0 1 ersatz == "/" then + /. + ersatz + else + /. + builtins.getEnv "PWD" + "/${ersatz}" + ); + mkSource = - spec: + name: spec: assert spec ? type; let path = @@ -17,16 +59,19 @@ let mkPyPiSource spec else if spec.type == "Channel" then mkChannelSource spec + else if spec.type == "Tarball" then + mkTarballSource spec else builtins.throw "Unknown source type ${spec.type}"; in - spec // { outPath = path; }; + spec // { outPath = mayOverride name path; }; mkGitSource = { repository, revision, url ? null, + submodules, hash, branch ? null, ... @@ -34,31 +79,39 @@ let assert repository ? type; # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository # In the latter case, there we will always be an url to the tarball - if url != null then - (builtins.fetchTarball { + if url != null && !submodules then + builtins.fetchTarball { inherit url; sha256 = hash; # FIXME: check nix version & use SRI hashes - }) + } else - assert repository.type == "Git"; let + url = + if repository.type == "Git" then + repository.url + else if repository.type == "GitHub" then + "https://github.com/${repository.owner}/${repository.repo}.git" + else if repository.type == "GitLab" then + "${repository.server}/${repository.repo_path}.git" + else + throw "Unrecognized repository type ${repository.type}"; urlToName = url: rev: let - matched = builtins.match "^.*/([^/]*)(\\.git)?$" repository.url; + matched = builtins.match "^.*/([^/]*)(\\.git)?$" url; short = builtins.substring 0 7 rev; appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; in "${if matched == null then "source" else builtins.head matched}${appendShort}"; - name = urlToName repository.url revision; + name = urlToName url revision; in builtins.fetchGit { - url = repository.url; rev = revision; inherit name; # hash = hash; + inherit url submodules; }; mkPyPiSource = @@ -74,8 +127,20 @@ let inherit url; sha256 = hash; }; + + mkTarballSource = + { + url, + locked_url ? url, + hash, + ... + }: + builtins.fetchTarball { + url = locked_url; + sha256 = hash; + }; in -if version == 3 then - builtins.mapAttrs (_: mkSource) data.pins +if version == 5 then + builtins.mapAttrs mkSource data.pins else throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" diff --git a/npins/sources.json b/npins/sources.json index 15cda801f..141bcc744 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -8,9 +8,10 @@ "repo": "nixpkgs" }, "branch": "nixpkgs-unstable", - "revision": "3a05eebede89661660945da1f151959900903b6a", - "url": "https://github.com/nixos/nixpkgs/archive/3a05eebede89661660945da1f151959900903b6a.tar.gz", - "hash": "0n56l6v5k3lmrr4vjnp6xk1s46shkwdkvai05dzcbcabpl29yb9g" + "submodules": false, + "revision": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1", + "url": "https://github.com/nixos/nixpkgs/archive/fe51d34885f7b5e3e7b59572796e1bcb427eccb1.tar.gz", + "hash": "0pg3ibyagan1y57l1q1rwyrygrwg02p59p0fbgl23hf1nw58asda" }, "poetry2nix": { "type": "Git", @@ -20,11 +21,11 @@ "repo": "poetry2nix" }, "branch": "master", - "revision": "fe0dcb4c9b44162a385f1170895fe6a392ed71b5", - "url": "https://github.com/nix-community/poetry2nix/archive/fe0dcb4c9b44162a385f1170895fe6a392ed71b5.tar.gz", - "hash": "0cxccm7hzcmizhbg79rdqimjndin98waibw824cmgzwwqkyzl9lv" + "submodules": false, + "revision": "ce2369db77f45688172384bbeb962bc6c2ea6f94", + "url": "https://github.com/nix-community/poetry2nix/archive/ce2369db77f45688172384bbeb962bc6c2ea6f94.tar.gz", + "hash": "0xq52gq2920xnv7n8rchy3myxbijfpap8z0sd572ifla9dnpqzvi" } }, - "version": 3 + "version": 5 } - diff --git a/source/contributing/documentation/diataxis.md b/source/contributing/documentation/diataxis.md index 8cd7d75f1..aa466c7ac 100644 --- a/source/contributing/documentation/diataxis.md +++ b/source/contributing/documentation/diataxis.md @@ -39,7 +39,7 @@ A concept can also describe the historical context behind why something works th If you find yourself wanting to write about the nitty gritty details of how something works, you most likely want to write an explanation. -### Guides vs. tutorials +### Guides vs. Tutorials We find that contributors primarily struggle with the difference between a Guide and a Tutorial. diff --git a/source/guides/recipes/post-build-hook.md b/source/guides/recipes/post-build-hook.md index 2c9c4d3ee..67d5833d5 100644 --- a/source/guides/recipes/post-build-hook.md +++ b/source/guides/recipes/post-build-hook.md @@ -67,7 +67,7 @@ Make sure the hook program is executable by the `root` user: # chmod +x /etc/nix/upload-to-cache.sh ``` -## Updating nix configuration +## Updating Nix configuration Set the [`post-build-hook`](https://nix.dev/manual/nix/2.22/command-ref/conf-file#conf-post-build-hook) configuration option on the local machine to run the hook: diff --git a/vale/Style/headers.yml b/vale/Style/headers.yml index 40bfe6e4f..ad35796e6 100644 --- a/vale/Style/headers.yml +++ b/vale/Style/headers.yml @@ -1,5 +1,5 @@ extends: capitalization -message: "'%s' should be in sentence case" +message: "Should be in sentence case: '%s'" level: error scope: heading # $title, $sentence, $lower, $upper, or a pattern. @@ -9,3 +9,6 @@ indicators: - "." exceptions: - macOS + - Nix + - I + - GNOME diff --git a/vale/Vocab/Nix/accept.txt b/vale/config/vocabularies/Nix/accept.txt similarity index 100% rename from vale/Vocab/Nix/accept.txt rename to vale/config/vocabularies/Nix/accept.txt