730 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] 0c7c24795b Merge staging-next into staging 2026-06-15 00:51:50 +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
nixpkgs-ci[bot] a0ee92dfa2 Merge staging-next into staging 2026-06-02 00:49:58 +00: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
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
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 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
Yureka 2141b99d9e tree-wide: use allowUnfreePackages where applicable 2026-01-27 13:10:24 +01: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
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
Atlas Yu f2f3ce2af8 nixos/nixos-generate-config: fix intel-npu imports
The generated configuration during the installation will failed to
evaluate "error: The option `hardware.cpu.intel.npu' does not exist."
on Intel CPUs have NPU support.

- Fix this by adding the missing imports when PCI ID matches.
- Also update the PCI ID list (linux v6.18).

Closes: #470638
2025-12-19 17:03:34 +08:00
Thiago Kenji Okada b302bf69ab nixos-rebuild-ng: drop withReexec option
Different from `nixos-rebuild`, re-exec in `nixos-rebuild` should always
work, so there shouldn't be much of an issue enabling it by default.
2025-12-03 22:41:16 +00:00
Thiago Kenji Okada 19b7452eff nixos-rebuild-ng: remove withNgSuffix option 2025-12-03 22:41:16 +00:00
Thiago Kenji Okada 3e892ed367 nixos-rebuild: remove 2025-12-03 22:41:16 +00:00
Sandro 4321bbf1c1 intel-npu-driver: init at 1.26.0 (#382756) 2025-11-26 17:13:48 +00:00
Winter M bf9e0019ce nixos/installer/tools: use system's configured Nix for nixos-option 2025-11-11 14:30:15 -05:00
nixpkgs-ci[bot] 1f71b1fc26 Merge master into staging-next 2025-10-04 00:15:35 +00:00
Maximilian Bosch a6b0564b7d nixos/filesystems: fix special file-systems for systemd-nspawn (#345899) 2025-10-03 19:33:31 +00:00
nixpkgs-ci[bot] a4cb5a506b Merge master into staging-next 2025-10-02 00:16:08 +00:00
Philip Taron 4b4987c5c2 nixos/tools: remove deprecated accessors for pkgs.nixos-option and pkgs.nixos-enter
These warnings were added in 5dcbab6. It has been a full year since they were added -- time to remove them.
2025-10-01 08:38:15 -07:00
Philip Taron 4b1a0a4aab nixVersions.stable: nix_2_28 -> nix_2_31 2025-09-22 21:17:18 +02:00
Maximilian Bosch a532cb052e nixos/containers: add boot.isNspawnContainer option
There are a bunch of components such as incus or LXC that also use
`boot.isContainer`, so we'd have to differentiate between "OS container"
and "actually nspawn".

This became necessary for the file-systems part where nspawn takes care
of setting up special filesystems like `/proc`, `/dev` etc., but others
don't.

To allow for a `boot.isContainer` being less overloaded, this introduces
`boot.isNspawnContainer` that is exclusively used for nspawn-specific
things. When `true`, `boot.isContainer = true;` is implied.
2025-09-21 13:26:23 +02:00
Philip Taron a75061e577 nixVersions.nix_2_28: 2.28.4 -> 2.28.5
Diff: https://github.com/NixOS/nix/compare/refs/tags/2.28.4...refs/tags/2.28.5

No changelog found; this brings backported changes from June through August to the stable Nix for Nixpkgs.
2025-09-02 10:18:14 -07:00
Emily 51a41ce9a1 installer/nixos-generate-config: remove broadcom_sta (#426831) 2025-07-27 05:35:35 +01:00
NullCube 9c9f467d49 installer/nixos-generate-config: remove broadcom_sta
Resolves the installer failing on devices that include this hardware, as
broadcom_sta was marked as insecure due to being unmaintained and having
active CVE's.

This commit be reverted when/if the installer has a mechanism for allowing
insecure packages.
2025-07-26 18:37:53 -07:00
Atlas Yu 1943dbfcca intel-npu-driver: init at 1.19.0
Only support the standalone build.

Closes: #348739
2025-07-14 10:11:47 +08:00
Emily 8115e2b01a nixos-generate-config: prefer /dev/mapper paths for mounts
Currently, we generate `/dev/disk/by-uuid` paths for encrypted LUKS
volumes, which makes it impossible to determine that they are waiting
on a Device Mapper device at boot. Using `/dev/mapper` paths ensures
that systemd stage 1 waives its standard mount timeout for these
volumes to allow the user more time to enter the LUKS password.
2025-07-13 12:59:43 +01:00
Martin Weinelt f633ed9278 nixos/installer: enable networkmanager by default (#420923) 2025-07-04 22:21:11 +02:00
Martin Weinelt b05541933d nixos/installer: enable networkmanager by default
This is the easiest pick for new users to get their footing on NixOS.

NetworKManager allows managing a wide variety of different network
interface types interactively and with ease. It replaces `useDHCP` since
its default profiles for Ethernet and WLAN come with DHCP enabled by
default.
2025-06-29 19:55:44 +02:00
ryunix 9feba7c2ff nixos/nixos-generate-config: remove extra indentation in flake output 2025-06-27 00:36:25 +09:00
Jörg Thalheim 28e4681066 nixVersions.nix: 2.28.3 -> 2.28.4 2025-06-24 18:25:41 +02:00
Thiago Kenji Okada 9806c0cd3e nixos/tools: enable system.rebuild.enableNg by default 2025-06-11 10:43:12 +01:00
Graham Christensen 7e7cf1ce2f nixos-generate-config: Add a flake default to the conf file 2025-06-06 10:32:55 -04:00
Paul Haerle 36607ba6e6 installer/tools: fix grammatical error in docs (#388452) 2025-05-10 11:31:39 +02:00
Paul Haerle 772ee19537 installer: fix broken search suggestion in default config (#378797) 2025-05-09 20:35:51 +02:00
Jörg Thalheim 7fd4e73000 nix: update nix-fallback-paths to 2.28.3 2025-04-30 08:35:16 +02:00
zowoq e5b760b14f nix: update nix-fallback-paths to 2.28.2 2025-04-20 15:24:11 +10:00
Jörg Thalheim 8db5666df2 nixVersions: update nix-fallback-paths (2.24.14 -> 2.28.1) 2025-04-09 06:39:56 +02:00
Jörg Thalheim ae8f07e1dd nixVersions.nix_2_24: 2.24.13 -> 2.24.14
Diff: https://github.com/NixOS/nix/compare/2.24.13...2.24.14
2025-04-07 12:36:38 +02:00
Jörg Thalheim 49a708c3f7 nix: update nix-fallback-paths to 2.24.13 2025-03-27 13:24:50 +01:00