Commit Graph

158 Commits

Author SHA1 Message Date
Sandro
df1f23dc72 nixos/installer: fix defaultText rendering as plain string (#530765) 2026-09-28 12:05:23 +00:00
Thiago Kenji Okada
6500ce6442 nixos-version: escape specialisations and use kernel.modDirVersion if available 2026-09-28 11:37:07 +01:00
Thiago Kenji Okada
6025007e0e nixos-version: add --kernel-version and --specialisations 2026-09-28 09:40:39 +01:00
Grayson Tinker
12287d7ab5 nixos/installer/tools: use channel tarball by default instead of GitHub
The project-hosted channel tarballs have several benefits, including
better compression, non-reliance on GitHub, and an included command-not-found
database helpful for new users. Switch to the better default.
2026-09-06 23:12:53 -06: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
Sandro
51a9e8c3db nixos/installer: fix defaultText rendering as plain string 2026-06-11 17:24:36 +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
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
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
Aleksana
8a099c52c3 nixos/installer/tools: use system's configured Nix for nixos-option (#460748) 2025-12-24 08:45:29 +00: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
Winter M
bf9e0019ce nixos/installer/tools: use system's configured Nix for nixos-option 2025-11-11 14:30:15 -05: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
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
Thiago Kenji Okada
9806c0cd3e nixos/tools: enable system.rebuild.enableNg by default 2025-06-11 10:43:12 +01: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
Will Fancher
674a41e913 nixos-generate-config: Set linuxPackages_latest when ISO boots latest kernel 2025-03-16 01:38:37 -04:00
Will Fancher
da9a092c34 nixos/iso-image.nix: nixfmt 2025-03-16 00:23:46 -04:00
Anton Mosich
69641d3531 installer/tools: fix grammatical error in docs 2025-03-09 15:07:53 +01:00
Pablo Ovelleiro Corral
1606ea91b4 nixos-generate-config: add --flake option
Co-authored-by: éclairevoyant <848000+eclairevoyant@users.noreply.github.com>
2025-02-18 15:37:53 +07:00
Martin Schwaighofer
f83f6a25ce installer: fix broken search suggestion in default config 2025-02-02 13:18:37 +01:00
Wolfgang Walther
dc0e094b33 nixos/installer: replace substituteAll with replaceVarsWith for tools 2025-01-28 22:30:27 +01:00
github-actions[bot]
92be6e3838 Merge staging-next into staging 2024-12-30 18:04:51 +00:00
nicoo
238b407862 nixos: hardware.pulseaudio → services.pulseaudio (#369391) 2024-12-30 13:46:50 +00:00
Wolfgang Walther
b3fb9afdb0 replaceVarsWith: init (#360771) 2024-12-14 20:26:35 +01:00
Wolfgang Walther
4ce241c882 replaceVarsWith: init
Takes the extended features of nix substituteAll to a replaceVars
variant to get rid of those cases that use substituteAll to build a full
package with meta information etc.
2024-12-14 20:16:10 +01:00
Thiago Kenji Okada
43e6aa5bd2 nixos-rebuild-ng: enable reexec if system.rebuild.enableNg is enabled 2024-12-10 18:38:08 +00:00
Thiago Kenji Okada
ae6664cc51 nixos/tools: add system.rebuild.enableNg 2024-12-10 18:38:08 +00:00
Maximilian Bosch
859c76c505 nixos/tools: add enable options to manual
E.g. when overriding `nix` with `pkgs.lix`, `nixos-option` will fail.
Given that I haven't used it in a very long time, I wanted to disable
it, but finding an option to turn off `nixos-option` is kinda hard given
that the options are generated here using `mkToolModule`.

I assumed that this isn't possible until I learned that
`system.tools.X.enable` exists. To me, this is a clear sign that these
shouldn't be internal.
2024-11-18 16:22:41 +01:00
K900
4a2c7def57 nixos/tools: Make the tools derivations overridable (#353173) 2024-11-09 10:20:19 +03:00
r-vdp
2eb92f4063 fixup! nixos/tools: set the enable options with mkDefault 2024-11-02 19:03:29 +01:00
r-vdp
ba3e5b02f6 nixos/tools: set the enable options with mkDefault
This makes it easier to enable some of them again.
2024-11-02 18:19:57 +01:00
r-vdp
8b2577c7d5 nixos/tools: Make the tools derivations overridable
Make sure that when re-assigning an overridden derivation to system.build.*,
the overridden derivation is also the one that ends up in
environment.systemPackages.
2024-11-02 18:17:24 +01:00
ibbem
30f40ac177 nixos-generate-config: Use the Firefox module
The Firefox module installs and enables the selected locale whereas the
Firefox package just uses the default locale. Hence, Firefox's language
was still English even when choosing a language other than English.
2024-10-31 19:30:08 +01:00
K900
e9a78e0285 nixos/installer/tools: only enable tools if nix is enabled
This restores the old behavior of being able to remove
everything nix-related with just `nix.enable = false`.

Fixes #344083.
2024-09-24 08:19:36 +03:00
K900
5dcbab6b74 nixos/tools: continue cleanup
- remove with lib
- shuffle some things around for readability
- add separate options for each tool
2024-09-21 16:10:32 +03:00
K900
51b47621ac nixos-install: move to pkgs/by-name 2024-09-20 08:44:37 +03:00
K900
825f6ffa9e nixos-enter: move to pkgs/by-name 2024-09-20 08:44:37 +03:00
K900
8353a681b5 nixos-build-vms: move to pkgs/by-name 2024-09-20 08:44:36 +03:00
Sandro Jäckel
cb8b6a5d00 treewide: reanme renamed libinput options 2024-04-17 23:34:07 +02:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Norbert Melzer
4278bc6297 Merge pull request #271668 from eclairevoyant/default-config
nixos/installer-tools: mention PulseAudio+PipeWire instead of ALSA+PulseAudio in generated config
2024-04-04 00:40:25 +02:00