1353 Commits

Author SHA1 Message Date
Sergei Zimmerman 21fa30f174 nix: update nix-fallback-paths to 2.34.8 2026-07-06 23:56:11 +03:00
nixpkgs-ci[bot] be92e0575f Merge master into staging-next 2026-07-03 12:39:18 +00:00
Yureka 994c1f3d01 sd-image-aarch64: support rpi5 2026-07-03 10:02:48 +02:00
nixpkgs-ci[bot] 0c7c24795b Merge staging-next into staging 2026-06-15 00:51:50 +00:00
nixpkgs-ci[bot] 5a4b819043 Merge master into staging-nixos 2026-06-14 12:41:22 +00:00
nixpkgs-ci[bot] b231a26fab Merge staging-next into staging 2026-06-14 12:40:54 +00:00
Will Fancher f7e86191f6 installer: remove all deprecated sd-image (#482728) 2026-06-14 12:15:07 +00:00
Martin Weinelt 3da268745a nixos/installer/tools: enable run0 module
The run0 module now enables polkit and properly reflects the intent
behind the `enableRun0Elevation` option.
2026-06-11 20:31:49 +02:00
Martin Weinelt 0c1e323f6a nixos/installers/calamares: opt into pkexec 2026-06-11 20:31:23 +02:00
nixpkgs-ci[bot] e14f7092e4 Merge staging-next into staging 2026-06-10 18:55:14 +00:00
Emily 31d1d80b3f lib/systems: move kernel configuration out of the platform structure
Currently, you need to override `stdenv.hostPlatform` to request a
compressed kernel on AArch64, and the kernel configuration is split
between the central structured configuration and string snippets in
platform definitions. This has consequently made the latter bitrot
terribly. Since the platform‐specific logic is now very limited after
cleaning up the detritus, we can move it into the kernel derivation
and expose the relevant configuration there for anyone who wants to
customize it further or needs to read it out.

Co-authored-by: zowoq <59103226+zowoq@users.noreply.github.com>
2026-06-10 11:17:38 +10:00
nixpkgs-ci[bot] e44357a615 Merge staging-next into staging 2026-06-08 07:44:33 +00:00
K900 bb38195945 nixos/plasma6: install plasma-keyboard by default
Touch devices are real and our UX sucks out of the box on them.
Let's at least suck a little bit less.
2026-06-07 13:08:38 +03:00
nixpkgs-ci[bot] 1baa9a8bad Merge staging-next into staging 2026-06-03 19:21:09 +00:00
r-vdp 466530d1d3 nixos/calamares-plasma6: replace activation script with tmpfiles
Part of #475305.
2026-06-03 18:51:52 +03:00
nixpkgs-ci[bot] a0ee92dfa2 Merge staging-next into staging 2026-06-02 00:49:58 +00:00
nixpkgs-ci[bot] 09c3691947 Merge master into staging-nixos 2026-06-01 19:40:02 +00:00
nixpkgs-ci[bot] d644c92282 Merge staging-next into staging 2026-06-01 19:39:24 +00:00
NotAShelf 7b7b68f76c nixos/iso-image: update comment to reflect systemd and scripted initrd paths
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Iaaa48d692e400cf17e1ec7ad82e656716a6a6964
2026-05-31 14:41:31 +03:00
Ramses 82141a1cd5 nixos-rebuild-ng: add --elevate={sudo,run0} and polkit-stdin-agent (#512018) 2026-05-30 20:01:40 +00:00
r-vdp c30b2c06d9 nixos-rebuild-ng: add --elevate=run0
Locally this just prefixes activation commands with `run0 --`, so the
user's normal polkit agent (graphical or pkttyagent) handles auth.

For --target-host, run0 would need a controlling terminal, which we
deliberately do not allocate over SSH. Instead the equivalent
`systemd-run --uid=0 --pipe --wait ...` form is used. Without
--ask-elevate-password this relies on a polkit rule on the target
granting the deploying user `org.freedesktop.systemd1.manage-units`.
With --ask-elevate-password the command is wrapped in
polkit-stdin-agent, which registers a per-process polkit agent for the
child and answers the PAM conversation from stdin.

A transient unit does not inherit the SSH login environment. On NixOS
the unit's PATH is just the systemd store path, so neither `env` nor
`nix-env` would be found inside it. Elevator.wrap_remote() therefore
now takes the env mapping and the command, and returns the full remote
argv: sudo keeps the existing `/bin/sh -c 'exec /usr/bin/env -i ...'`
wrapper inside itself, while run0 puts the shell wrapper *around*
systemd-run and forwards the resolved values into the unit via
--setenv. The Arg/Args/EnvValue/PRESERVE_ENV types and the env-shell
helper move from process.py into elevate.py to avoid a circular import,
and callers are updated to import them from there.

polkit-stdin-agent is resolved on the machine doing the elevation
rather than baked in as a host-arch store path, which would be wrong
for --no-reexec, cross-arch deploys (re-exec hits ENOEXEC and falls
back), --rollback/--store-path, and Darwin deployers. Locally that is
PATH. Remotely, Elevator.for_target_config() binds the elevator to the
toplevel just placed on the target, and a small /bin/sh picker tries
<toplevel>/sw/bin/polkit-stdin-agent (target-arch, in the copied
closure) then PATH, exiting with an actionable error pointing at
system.tools.nixos-rebuild.enableRun0Elevation when neither resolves.
That option (added here) puts the agent in environment.systemPackages
and asserts security.polkit.enable.

A nixos-rebuild-target-host subtest exercises the full remote run0
path (polkit-stdin-agent + systemd-run + activation) end-to-end.

Drop the now-unused stdenv argument from package.nix while here.

Closes #507054.
2026-05-29 00:22:19 +03:00
nixpkgs-ci[bot] 5e438cd865 Merge staging-next into staging 2026-05-14 17:48:23 +00:00
Sandro 2cbff54512 nixos-generate-config: substitute bcachefs (#510314) 2026-05-13 23:53:26 +00:00
znmz 6cc28f79f8 nixos/installer: correct comment in tools.nix
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2026-05-12 23:55:55 +03:00
Marie Ramlow f3ba454c8d nixos/installation-cd-graphical-calamares-plasma6: disable qt5 integration 2026-05-08 19:41:48 +02:00
Will Fancher b791c197a4 nixos/installation-cd-graphical-calamares-cosmic: init (#402741) 2026-05-08 14:55:52 +00:00
Jörg Thalheim 070d5328c8 nix: 2.34.6 -> 2.34.7
Update source hash and fallback paths for the new release.
2026-05-04 20:58:28 +02:00
Adam C. Stephens fb266d7643 nixos/channel: fix channel linkage if broken channel link already exists 2026-04-25 15:58:39 -04:00
Pratham Patel 732cf8d4e8 nixos/installation-cd-graphical-calamares-cosmic: init 2026-04-23 18:51:05 +05:30
beviu 623ec633ba nixos-generate-config: substitute bcachefs
For systems where the package is marked as broken, use `false` instead.
The Perl script checks for a non-zero exit status, so it will handle it
as if the command failed.
2026-04-15 16:19:07 +02:00
beviu 8b7658bfa5 installer/nixos-generate-config: use lib.getExe 2026-04-15 16:19:07 +02:00
Philip Taron 924e5a22c7 nixVersions.stable: nix_2_31 -> nix_2_34 2026-04-12 14:50:38 -07:00
Jörg Thalheim cc8d42cd81 nix: update nix-fallback-paths to 2.31.4 2026-04-07 22:33:13 +02:00
Martin Weinelt 0fcdf39c54 nixos/hardware/cpu/intel/npu: import module (#507411) 2026-04-06 23:41:56 +00:00
Martin Weinelt 44cdcdf7aa nixos/nixos-generate-config: drop intel-npu import
Loading modules at config gen time is wrong. This should only happen for
profiles and the options should be available all the time instead.
2026-04-07 01:36:04 +02:00
Florian Klink 67808a39d6 nixos: convert boot.postBootCommands that load the nix DB to systemd services (#496852) 2026-04-06 22:43:07 +00:00
Will Fancher f8ed5f30c0 nixos/filesystems: Remove default = "auto" from fsType
NixOS has traditionally enabled the `ext` family of file systems by
default. Originally, when switching to systemd initrd, we wanted to
transition to making this explicit so that initrds could be made
without `ext`. The problem is that anyone with `fsType = "auto";` for
an `ext` file system in initrd will fail to boot, which is not really
an acceptable regression as we switch to systemd initrd by default.

By removing `default = "auto"` from `fsType`, we rule out the vast
majority of these regressions as eval errors, since most users of
`fsType = "auto"` for ext file systems are using it because of the
default value.

In hindsight, this is probably what #225352 was really about.
2026-04-05 19:06:28 -04:00
Jörg Thalheim d0956cd741 sd-image: add preBuildCommands option (#501160) 2026-03-25 09:26:35 +00:00
Tanel Dettenborn 6fec0974dc nixos/sd-image: add preBuildCommands option
Allow running shell commands after the root filesystem image has been
prepared but before the final SD image is assembled. This is useful for
adjusting the rootfs, such as resizing it to a fixed size or injecting
additional files, without having to override the entire build
derivation.

Signed-off-by: Tanel Dettenborn <tanel.dettenborn@tii.ae>
2026-03-25 10:18:22 +01:00
Jörg Thalheim 2e7d15303c nixos/sd-image: add type and improve postBuildCommands description
The option was missing a type declaration. Use types.lines so multiple
modules can contribute commands that get merged with newlines.

While at it, document the $img shell variable so users do not have to
read the module source to discover it.
2026-03-25 10:16:50 +01:00
r-vdp 6ab12a513a nixos: convert remaining postBootCommands that load the nix DB to systemd services
Convert all remaining boot.postBootCommands that call
nix-store --load-db into register-nix-paths systemd services for
consistency with qemu-vm.nix and to make the ordering dependency
with nix-channel-init explicit.

All services use the same unit name (register-nix-paths) and the
same sysinit.target ordering, so nix-channel-init's
after=register-nix-paths.service dependency works uniformly across
all platforms.

Platform-specific logic (netboot password setup, sd-image partition
expansion) is kept in the service script or in boot.postBootCommands
as appropriate.
2026-03-23 10:01:50 +01:00
r-vdp d292d47526 nixos/channel: convert postBootCommands to a systemd service
Replace boot.postBootCommands with a nix-channel-init systemd
service. This is needed because the nix store DB registration in
QEMU VMs now happens in a systemd service (register-nix-paths)
rather than in postBootCommands, so the channel init must also be
a systemd service to express the ordering dependency.

The service runs in sysinit.target, after local-fs.target and
(when present) register-nix-paths.service, but before
nix-daemon.socket. Since nix-env is invoked as root before the
daemon socket exists, it accesses the store directly.
2026-03-23 10:01:49 +01:00
K900 ff11081677 nixos/installation-cd-graphical-calamares-plasma6: use plasma-login-manager and plasma-keyboard 2026-02-17 11:33:51 +03:00
Yureka 2141b99d9e tree-wide: use allowUnfreePackages where applicable 2026-01-27 13:10:24 +01:00
Cryolitia PukNgae 582dc4aab0 installer: remove all deprecated sd-image
since commit 68afbf9d6385("installer: add deprecation warning about
sd-card file move"), it has been 5 years passed, and this should be
sufficient before the final deletion.

Signed-off-by: Cryolitia PukNgae <Cryolitia@gmail.com>
2026-01-22 23:54:46 +08:00
Philip Taron a4ef4c189c nixVersions.nix_2_31: 2.31.2 -> 2.31.3
Changelog of fixes:

## Bug fixes (crashes)

- Fix segfaults from `toView()` when compiled with newer nixpkgs (NixOS/nix#14154)
- Fix use-after-move in `DerivationGoal::repairClosure` and `SampleStack` (NixOS/nix#14086)
- Fix assertion failure on partially valid derivation outputs (NixOS/nix#14137)
- Fix `RestrictedStore::addDependency` recursion causing crashes (NixOS/nix#14729)
- Fix crash on flakerefs containing newlines (NixOS/nix#14450)

## Bug fixes (functionality)

- Fix fakeSSH check breaking SSH copies with `user@host` format (NixOS/nix#14150)
- Fix `builtins.dirOf` regression from Nix 2.23 (NixOS/nix#14515)
- Restore missing `isAllowed` check in `ChrootLinuxDerivationBuilder` (NixOS/nix#14531)
- Fix curl with c-ares failing to resolve DNS in sandbox on macOS (NixOS/nix#14792)
- Fix tarball percent decoding for `file://` URIs (NixOS/nix#14729)
- `exportReferencesGraph`: Handle heterogeneous arrays (NixOS/nix#13861)
- Fix filesystem ops in store optimization (NixOS/nix#14676)

## Bug fixes (output)

- Fix double-quoting of paths in logs (NixOS/nix#14210)
- Include path in world-writable error messages (NixOS/nix#14785)

## Improvements

- Better git refnames validation (NixOS/nix#14253)
- Use pure/restricted eval for help pages (NixOS/nix#14156)
- Improve store-reference compatibility with IPv6 ZoneId literals (NixOS/nix#14134)
- Correct `build-dir` error in manual (NixOS/nix#14745)

## Build system

- Add mdbook 0.5 support (NixOS/nix#14690)
- Drop legacy Apple SDK pattern (NixOS/nix#13976)

https://github.com/NixOS/nix/releases/tag/2.31.3
2026-01-15 12:28:55 -08:00
NAHO a2ed7e8d88 nixos: 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 \
      --exclude doc/manual/release-notes \
      --type file \
      . \
      nixos \
      --exec-batch sed --in-place --regexp-extended "
        s/\<builtins\.($(
          printf '%s\n' "${builtins[@]}" |
            paste --delimiter '|' --serial -
        ))\>/\1/g
      "

    nix fmt
2026-01-15 16:07:55 +01:00
nixpkgs-ci[bot] b3c6bf08a5 Merge master into staging-nixos 2025-12-24 12:08:27 +00:00
Aleksana 8a099c52c3 nixos/installer/tools: use system's configured Nix for nixos-option (#460748) 2025-12-24 08:45:29 +00:00
Michael Daniels 192ac6ac34 Revert "nixos/nixos-generate-config: fix intel-npu imports" 2025-12-23 20:17:39 -05:00