212 Commits

Author SHA1 Message Date
Robert Hensing aa1345fd8a lib/services: fix reload/readiness bugs and add compliance coverage (#540857) 2026-07-23 16:49:52 +00:00
cinereal ae9994806c lib/services: fix reload/readiness bugs and add compliance coverage
Fixes several correctness bugs primarily around modular services' recent
reload/notification options (#535695) and adds compliance coverage to guard them.

Fixes:

- `lib/services/service.nix`:
  - the reload-conflict assertion had inverted polarity, so it fired on the
    default configuration
  - the `mkIf` guard on `process.reloadCommand` had a misplaced paren, applying
    `!= null` to the `mkIf` result rather than to the condition
  - `process.reloadSignal` derives `process.reloadCommand`, so the assertion
    could not check `reloadCommand != null` -- that fired on every signal-only
    service. The command is now derived at `mkDefault` priority and the
    assertion is gated on `options.process.reloadCommand.highestPrio`, firing
    only when the user also set `reloadCommand` explicitly.
  - change `notificationProtocol` to a sub-module type
- `nixos/modules/system/service/systemd/service.nix`:
  - `systemd.mainExecReload`'s default ran `escapeSystemdExecArgs` (a list
    escaper) on the `nullOr str` `process.reloadCommand`; this threw
    `expected a list but found a string` and would have mangled `$MAINPID`. It
    now uses `process.reloadCommand` verbatim.
  - the `Type` default read a non-existent
    `config.serviceManager.notificationProtocol` instead of
    `config.notificationProtocol`.

Tests:

Extend the modular-service compliance suite to guard the above:

- Portable (manager-agnostic) eval assertions: `reloadSignal` derives
  `reloadCommand`, the conflict assertion does not fire on signal-only services
  but does when both are set explicitly, and `notificationProtocol.systemd`/`.s6`
  default to `false`.
- systemd-specific eval assertions: `serviceConfig.Type` (simple/notify) and
  `serviceConfig.ExecReload` are asserted on the resolved host units. This
  directly guards the `mainExecReload` fix, which threw before it.
- Runtime reload compliance test: a nested reloadable sub-service is started and
  reloaded, asserting the service observed the reload (recorded a SIGHUP marker).
  `callReload` receives the service's name path (the list of names from the
  top-level service down to the target sub-service); each integration joins it
  per its own unit-naming convention (NixOS dash-joins to the systemd unit name,
  e.g. `reload-inner.service`). Keeping it a path list rather than a read-only
  submodule option keeps the suite manager-agnostic.
- `doc/build-helpers/testers.chapter.md`: document `callReload`.

Follow-up to #535695.

Signed-off-by: cinereal <cinereal@riseup.net>
Assisted-by: Claude:claude-opus-4-8
2026-07-20 11:01:04 +02:00
Ryan Mulligan 35260ee51a doc: fix additional malformed fenced divs 2026-07-14 14:03:26 -07:00
Ryan Mulligan d875aae529 doc: fix mmdoc fenced div rendering 2026-07-14 14:02:36 -07:00
Johannes Kirschbauer 478044ca25 doc/fixed-point-arguments: add an example of wrapping with transformDrv and miscelaneous fixes (#537881) 2026-07-07 13:51:53 +00:00
Yueh-Shun Li 1c8c1cc2a7 doc/fixed-point-arguments: add an example of wrapping with transformDrv 2026-07-07 19:25:34 +08:00
Yueh-Shun Li 068e58f4cb doc/fixed-point-arguments: make examples callPackage-compatible 2026-07-07 19:24:41 +08:00
Yueh-Shun Li e97de7f4af doc/fixed-point-arguments: explicitly mention extendDrvArgs 2026-07-07 19:24:41 +08:00
Johannes Kirschbauer 3314b11056 doc/manual: reword 'nixpkgs reference manual' to just 'nixpkgs' manual (#537491) 2026-07-04 16:30:21 +00:00
Johannes Kirschbauer 993dc495e8 doc/fixed-point-arguments: restructure chapter to make it more approachable 2026-07-02 14:27:11 +02:00
Johannes Kirschbauer d9c5294435 doc/manual: reword 'nixpkgs reference manual' to just 'nixpkgs' manual 2026-07-01 18:39:40 +02:00
Robert Hensing ef8925c8e1 testers.modularServiceCompliance: init (#531062) 2026-06-26 15:12:52 +00:00
Robert Hensing 43908e0d12 testers.modularServiceCompliance: init
Portable test suite for modular services, designed to be usable with
other service managers and use cases, inside Nixpkgs and externally.

Like modular services itself, it's still quite bare-bones. New
features can crystallize around this kind of infrastructure.

Assisted-By: Claude Opus 4.7/4.8 era Claude models
2026-06-26 14:25:32 +02:00
Robert Hensing fb0d18ee0b testers.lycheeLinkCheck: improve root-relative link UX
Lychee by itself does not have a way to explicitly declare the
intent for the site to be relocatable.
Recent-ish changes in lychee and/or its dependencies have made
it catch the a root reference in all mdbook 404.html pages,
which is quite confusing.
By improving the UX around this aspect of the site, we resolve
at least part of that confusion.
(Though mdbook users should probably exclude the 404 page)
2026-05-16 12:35:07 +02:00
Robert Hensing 71a39baee8 testers.lycheeLinkCheck: add extraArgs 2026-05-09 23:01:02 +02:00
Defelo cbea5bb610 treewide: update radicle domains
https://radicle.dev/2026/04/23/domain-move

generated using the following nushell script:

```nu
rg -l radicle | lines | do {
  sd -F seed.radicle.xyz seed.radicle.dev ...$in

  sd -F iris.radicle.xyz iris.radicle.network ...$in
  sd -F seed.radicle.garden iris.radicle.network ...$in

  sd -F rosa.radicle.xyz rosa.radicle.network ...$in
  sd -F ash.radicle.garden rosa.radicle.network ...$in

  sd -F app.radicle.xyz radicle.network ...$in

  sd -F docs.radicle.xyz radicle.dev ...$in
  sd -F radicle.xyz radicle.dev ...$in
}
```
2026-04-24 11:21:02 +02:00
Yueh-Shun Li ed96bfd307 buildEnv: construct with structured attributes and pass chosenOutputs directly 2026-04-02 07:31:12 -07:00
Philip Taron 873d9a9288 buildEnv: support fixed-point arguments (#432957) 2026-03-25 14:05:49 +00:00
Philip Taron 179ca9859e doc: buildenv.section.md: fix argument name, default, and grammar
- includeClosure -> includeClosures (matching the actual argument name)
- extraPrefix default: [ ] -> "" (matching the actual default)
- Fix broken sentence about ignoreSingleFileOutputs
2026-03-19 13:17:20 -07:00
Yueh-Shun Li 3182567271 doc: buildenv.section.md: init 2026-03-19 13:17:19 -07:00
blokyk 397efdd920 doc: move writeShellApplication param docs to manual 2026-02-20 15:24:14 +01:00
Jo fab93965ec fetchItchIo: init (#470088) 2026-02-19 07:39:00 +00:00
Ulysses Zhan bd388e2d49 fetchItchIo: init 2026-02-06 17:45:32 -08:00
Fernando Rodrigues a1c9639328 doc: expand fetchFromGitea's documentation to include fetchFromForgejo and fetchFromCodeberg
Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2026-01-31 21:08:16 +11:00
nixpkgs-ci[bot] 4f189086d0 Merge master into staging-nixos 2026-01-26 18:08:53 +00:00
Michael Daniels 006ecdbdeb treewide: fix typos (#479869) 2026-01-24 21:36:44 +00:00
quantenzitrone 8a977098d7 docs: remove references to the xorg namespace 2026-01-23 15:33:14 +01:00
Jasi 03b2128fcc fetchFromSavannah: deprecate
The Savannah administrators do not want package maintainers to use
cgit snapshots due to putting strain on the servers and have disabled
cgit snapshots for most if not all of their repositories.

See: https://lists.gnu.org/archive/html/savannah-hackers/2025-12/msg00014.html

Co-authored-by: Philip Taron <philip.taron@gmail.com>
Co-authored-by: LIN, Jian <me@linj.tech>
2026-01-14 20:48:27 -05:00
Ben Siraphob c7e10647ea treewide: fix typos 2026-01-13 14:45:11 -05:00
Robert Hensing 7648a2676b dockerTools: Replace bashInteractive with bash (#453912) 2026-01-06 11:59:22 +00:00
Philip Taron 52fbdf3dee vmTools: drop CentOS Stream
As @uninsane points out, these are designed to rot rapidly.
2026-01-05 10:33:39 -08:00
Philip Taron 0f6e482a7f doc: update vmTools documentation based on the newly added disk images 2026-01-05 09:57:14 -08:00
Gergő Gutyina 630120119a doc: fix example (#435473) 2025-12-07 11:46:03 +00:00
·𐑑𐑴𐑕𐑑𐑩𐑤 4f698059ee doc: add darcs+pijul to the nix-prefetch-* list 2025-12-01 04:14:28 +07:00
Aleksana b33dbb8b7b doc: fix documentation about fetchurl nativeBuildInputs (#455915) 2025-11-19 09:33:55 +00:00
Jade Lovelace b7665da7e1 dockerTools: support meta attribute
I want to be able to set descriptions on my docker image derivations
since these can be ingested by various tooling for helpfulness.
2025-10-30 15:53:00 -07:00
Yueh-Shun Li b5b26aec86 doc: fix documentation about fetchurl nativeBuildInputs 2025-10-26 23:47:31 +08:00
Joel Holdsworth a003bc7c60 dockerTools: Replace bashInteractive with bash
bash has been interactive by default since this PR [1] was merged. This
commit simplifies dockerTools given that there is now no distinction
between bash and bashInteractive.

  * [1] https://github.com/NixOS/nixpkgs/pull/379368

Co-authored-by: commiterate <111539270+commiterate@users.noreply.github.com>
Signed-off-by: Joel Holdsworth <joel@airwebreathe.org.uk>
2025-10-21 09:53:38 -07:00
Yiyu Zhou eafa2f536f doc: fix examples 2025-10-19 23:15:58 -07:00
Sebastián Mancilla 249233af0d dockerTools: Comment tidy-ups, and documentation update (#450384) 2025-10-19 22:46:23 +00:00
Matt Sturgeon 237b3cb5ce testers.testEqualContents: add checkMetadata option
Allows ignoring file metadata differences (permissions, ownership)
when comparing files.

This is especially useful on darwin, where we often run into subtle
issues like:

    -Device: 1,23 Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ wheel)
    +Device: 1,23 Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 350/ nixbld)
2025-10-17 16:18:56 +01:00
Morgan Jones b6659f5d61 doc: add hunks to fetchpatch 2025-10-12 23:47:56 -07:00
Joel Holdsworth db13980434 dockerTools: Updated Docker and OCI spec links
Co-authored-by: commiterate <111539270+commiterate@users.noreply.github.com>
2025-10-09 11:04:44 -07:00
Jasi 55f59a63a9 doc/fetchers: expand fetchFromBitbucket docs
The approach used to expand the documentation for `fetchFromBitbucket`
purposefully mimics the documentation for `fetchFromGitHub` with the
goal of making sure the reader is aware of all of the fetcher's
capabilities without having to read the source code.
2025-10-05 10:18:54 -04:00
nixpkgs-ci[bot] 6dd046bf75 Merge master into staging-next 2025-10-03 18:05:39 +00:00
Philip Taron 885fd34de3 fetchFromGitHub: use fetchgit when the rootDir option is set (#446709) 2025-10-03 17:43:22 +00:00
Michael Daniels 42637c305f fetchFromGitHub: use fetchgit when the rootDir option is set
This argument was added to fetchgit in #427165,
and it's not supported by fetchzip.

Co-authored-by: Philip Taron <philip.taron@gmail.com>
2025-10-02 21:17:23 -04:00
K900 4999ae577c Merge remote-tracking branch 'origin/master' into staging-next 2025-09-30 21:47:55 +03:00
NAHO 854c5a5460 doc: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd --type file . doc --exec-batch sed --in-place --regexp-extended "
      s/\<builtins\.($(
        printf '%s\n' "${builtins[@]}" |
          paste --delimiter '|' --serial -
      ))\>/\1/g
    "

    nix fmt
2025-09-30 09:02:03 +02:00
nixpkgs-ci[bot] 8c2af3a8bf Merge master into staging-next 2025-09-23 09:00:10 +00:00