Commit Graph

219 Commits

Author SHA1 Message Date
quantenzitrone
93a668bc54 squashfs-tools: rename from squashfsTools, enable structuredAttrs
upstream package is called squashfs-tools and other distros also call the package this way https://repology.org/project/squashfs-tools
2026-08-17 14:32:21 +02:00
Pol Dellaiera
fa413c392c fetchers: add fetchFromHuggingFace (#506303) 2026-07-30 16:17:49 +00:00
uku
2e8c34b71a appimageTools: support finalAttrs
Replaces function invocation with lib.extendMkDerivation.
Warning: wrapAppImage now takes a `contents` argument instead of `src`,
to avoid shadowing the original AppImage file (eg. when using wrapType2)
The extracted archive can be accessed in derivations via `finalAttrs.contents`
2026-07-25 23:06:41 +02:00
K900
ec69cf3f7b Revert "nixos/modular-services: add portable process.environment" 2026-07-25 10:19:30 +03:00
Robert Hensing
541a6f371f nixos/modular-services: add portable process.environment (#518860) 2026-07-24 17:40:13 +00:00
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
Hugo Herter
4e9e357815 fetchers: add fetchFromHuggingFace
Add a Hugging Face Hub repository fetcher with support for model, dataset, and space repositories, custom Hub domains, tags and revisions, and the relevant fetchgit options.

Select storage through a backend argument. Git LFS is implemented through fetchgit; Xet is the default to match Hugging Face but fails explicitly until its implementation lands.

Expose the helper from pkgs, document its API, and register evaluation and fixed-output fetch tests.

Assisted-by: OpenAI Codex (GPT-5)
2026-07-18 13:48:57 +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
cinereal
608690995f nixos/modular-services: add portable process.environment
Adds modular service option `process.environment` to pass an attrset of
env vars to the service manager.
`null` values actively unset the variable before the process starts.

Values are `coercedTo (either path package) str` via interpolation,
mirroring `pathOrStr`, so paths and packages render to store-path strings
with string context preserved. The type is `lazyAttrsOf`, allowing one
entry to reference another (recursive env definitions).

The systemd backend unsets entries using `unexport` in `ExecStart`,
so the variable is absent even when `Environment=` or
the inherited environment would otherwise supply it.

The systemd backend lifts non-null entries onto the primary unit wrapped
per-key with `lib.mkDefault` so they merge with the existing priority-100
`environment.PATH` binding in `nixos/lib/systemd-lib.nix` while still letting
explicit `systemd.service.environment.<k>` overrides win.

The systemd extra-root modules are loaded via `importApply`, closing `pkgs`
over `systemd/service.nix` as a non-module argument (matching the portable
`lib/services/service.nix` convention) instead of passing a redundant `pkgs`
specialArg. The docs eval threads `pkgs = throw` accordingly.

Portable coverage lives in `testers.modularServiceCompliance`: an eval-level
check that a set value round-trips and a `null` value is preserved, plus an
integration test that records the service's own `/proc/$$/environ` and asserts
the set variable is present and the null variable is absent. The
systemd-specific grep assertions in `systemd/test.nix` cover how systemd
achieves this (`Environment=` rendering, null filtering, the `unexport`
wrapper, and override precedence).

Assisted-by: Claude:claude-opus-4-8
2026-07-11 22:54:46 +02: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