Commit graph

427 commits

Author SHA1 Message Date
Winter M 433ab91d52 nixos/installer/cd-dvd/iso-image: include memtest86+ in grub menu
We previously only did this for Syslinux, which we don't use on UEFI machines.

Co-authored-by: Lee Bousfield <ljbousfield@gmail.com>
(cherry picked from commit dcb0423368)
2025-11-05 07:50:30 +00:00
Wolfgang Walther 5cbdb94f3a
treewide: remove redundant parentheses
Auto-fixed by nixf-diagnose.

(cherry picked from commit 91a8fee3aa)
2025-10-05 12:59:25 +02:00
Wolfgang Walther aefcb0d50d
treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Will Fancher a2636dae46 iso-image: Combine GNOME and Plasma flavors
This allows users to choose between the two during bootup rather than
at download time.
2025-03-16 01:38:37 -04: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 0aad0248ce nixos/iso-image: Include latest kernel specialisation.
Now that ISOs include the latest kernel as a specialisation, separate
ISOs for the new kernel are no longer necessary.
2025-03-16 01:38:37 -04:00
Will Fancher f2204986a7 nixos/iso-image: Support specialisations. 2025-03-16 01:38:37 -04:00
Will Fancher 8eb8908837 nixos/iso-image: Move alternate boot options to submenus
This will make more sense when specialisations are introduced in the
ISO boot menu

nixos/modules/installer/cd-dvd/iso-image.nix
2025-03-16 01:38:37 -04:00
Will Fancher 3a2e8e97c3 nixos/iso-image: Disable plymouth along with display-manager.service
GNOME in particular just breaks if plymouth isn't disabled, because
GDM takes on the role of quitting plymouth in a GNOME
configuration. But if we're disabling the DM, we should disable
plymouth too anyway.
2025-03-16 01:03:25 -04:00
Will Fancher bef079a4b9 nixos/iso-image: Remove video= boot entries
These seem largely redundant with the progress that desktop
environments have made since they were introduced.
2025-03-16 01:03:21 -04:00
Will Fancher da9a092c34 nixos/iso-image.nix: nixfmt 2025-03-16 00:23:46 -04:00
K900 31aa4c5fef nixos/iso-image: fix build 2025-02-21 11:19:14 +03:00
Wolfgang Walther b19d0f6d3d
treewide: replace substituteAll with replaceVars 2025-02-10 22:51:56 +01:00
phaer 0b162c3dbc iso-image: fix output filename
While switching from isoImage.baseName to the unified image.baseName,
I accidentaly dropped label and system information from the iso filename.

This fixes it by including isoImage.edition in the default baseName for
all our isos. Resulting in filenames such as
`nixos-minimal-25.05beta708350.1d95cb5-x86_64-linux.iso` again instead
of just nixos-minimal.iso.
2025-01-08 14:35:07 +01:00
phaer a582fba754 installer/iso-image: use system.build.image
and rename:
- isoImage.isoBaseName -> image.baseName
- isoImage.isoName -> image.fileName
2024-12-16 15:35:21 +01:00
DavHau 08783a39b0 nixos: add option hardware.enableAllHardware
This allows users to simply enable support for all hardware by enabling the option `hardware.enableAllHardware`, instead of having to import `modules/profiles/all-hardware.nix`.

This is better, as the enableAllHardware option will be discoverable via search.nixos.org, while the `all-hardware.nix` is hidden inside nixpkgs and hard to discover.

Backward compatibility is provided by replacing the old `profiles/all-hardware.nix` with a file that sets the `enableAllHardware` option to true.
2024-12-12 16:45:25 +07:00
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
misuzu 2a1bf498aa
nixos/installation-cd-base: add git & rsync (#325511) 2024-12-01 16:35:33 +02:00
Jonathan Ringer b5168a9900 nixos/iso-image: fix isoImage.grubTheme = null;
Fixes `error: cannot coerce null to a string`
2024-11-26 21:18:21 +02:00
Will Fancher 80ec892b74
Revert "nixos/iso-image: fix isoImage.grubTheme = null; logic" 2024-11-26 07:56:33 -05:00
Artturin fa4b9638fa
nixos/iso-image: fix isoImage.grubTheme = null; logic (#156754) 2024-11-26 00:39:02 +02:00
Peder Bergebakken Sundt 3100acba08 treewide: \xc2\xa0 ->
I have no idea what this escape sequence even is, but it breaks the nix parser with cryptic errors if not used in a comment.
A friend let me know MacOS is prone to input weird spaces, not sure if that is the source.

Candidates were located and created with:

    chr="$(echo -e '\xc2\xa0')"; rg -F "$chr" -l | xe sd -F "$chr" " "

There are some examples left, most being example output from `tree` in various markdown documents, some patches which we can't really touch, and `pkgs/tools/nix/nixos-render-docs/src/tests/test_commonmark.py` which I'm not sure if should be addressed
2024-10-02 15:33:06 +02:00
Luflosi d979b45371
nixos/iso-image: avoid collision between GRUB2 versions
4b836fb680 added `pkgs.grub2_efi` to `environment.systemPackages` so that it would be in the Nix store and available for install. But `pkgs.grub2` is already in the list. This causes the various paths of the two GRUB2 versions to collide. To fix this, put `pkgs.grub2_efi` into `system.extraDependencies` instead. This should achieve the same effect of adding the second GRUB2 version to the Nix store without the paths colliding in the environment.

To reproduce the problem, execute `nix-build nixos -I nixos-config=nixos/modules/installer/cd-dvd/iso-image.nix -A config.system.build.isoImage` and look for messages like
```
warning: collision between `/nix/store/9jk1p9n5dl431lcm4w9p6x6x8a00dm0q-grub-2.12/bin/grub-install' and `/nix/store/809l0i6aydg4zhn3kqf723brjyp2qm8h-grub-2.12/bin/grub-install'
```
2024-09-23 17:59:26 +02:00
Josh Hoffer 6295433b2b installer: only use squashfs threads=multi on supported kernels
The `threads` SquashFS mount option was introduced in Linux 6.2 [1].
Since we still support older kernels and external users of nixpkgs
may reuse the ISO installer modules, this option should be guarded
by a kernel version check.

[1] https://www.kernelconfig.io/config_squashfs_choice_decomp_by_mount?arch=x86&kernelversion=6.10.10
2024-09-18 17:27:20 -07:00
Connor Baker 58a8cfa7da
Faster SquashFS decompression of Nix Store (#341149) 2024-09-16 08:07:40 -07:00
Felix Buehler e6da97a160 nixos/installation-cd-graphical-base: remove with lib; 2024-09-15 10:43:45 +02:00
Felix Buehler a15394d51a nixos/iso-image: remove with lib; 2024-09-15 10:43:45 +02:00
Sandro da1b2b5adb
nixos/profiles/minimal: drop noXLibs
noXLibs is an advanced option for advanced users which know how to recognize and debug build failures which might be caused by the added overlays.

The minimal profile should be minimal but also save to use for many people and not cause build failures in packages it really shouldn't.
2024-09-14 00:59:14 +02:00
Raito Bezarius 4a94f45bb4 nixos/installer/cd-dvd: use EFI/BOOT and EFI/BOOT/BOOT$ARCH.EFI rather than lowercase
Reported in https://discourse.nixos.org/t/nix-iso-unable-to-boot-in-uefi-mode-but-other-distros-can/16473/24

There seems to be weird situations with casing and FAT8.3 filenames, UEFI firmwares and what not.
To increase our compatibility, let's ensure we have the critical stuff (the bootable) in uppercase.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-13 04:23:53 -04:00
Felix Bühler 686fa55f27
nixos/iso-image: remove with lib; (#339102) 2024-09-11 18:57:35 +02:00
Josh Hoffer ff8b2d5162 nixos/iso-image: mount squashfs with threads=multi 2024-09-10 22:01:39 -07:00
Felix Buehler e3ee1a97d4 nixos/iso-image: remove with lib; 2024-09-10 21:36:16 +02:00
K900 78d6adf386 nixos/installer: don't enable Pulseaudio 2024-09-04 13:56:50 +03:00
Jan Tojnar d2da9a19c4 gnome-settings-daemon{,43}: Move from gnome scope to top-level 2024-09-01 14:16:31 +02:00
Will Fancher 49192ef7a3 nixos/iso-image: Compress squashfs with zstd 19 2024-08-31 12:21:36 -04:00
Sandro Jäckel d50e23f0a4
glxinfo: replace with mesa-demos 2024-08-28 14:38:12 +02:00
installer e9a119ead4 nixos/installation-cd-base: add git & rsync 2024-07-13 18:59:45 +02:00
Sandro Jäckel 1c2132f714
nixos/installation-cd-plasma5: fix even more aliases 2024-06-03 16:26:54 +02:00
Sandro a88fb925bb
nixos/installation-cd-plasma5: don't use alias for konsole 2024-06-03 16:22:12 +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
Sandro Jäckel 476b8c276e
treewide: rename renamed sddm/displayManager settings 2024-04-08 21:56:38 +02:00
K900 77536af43b nixos/iso-image: extremely cursed performance optimization for Hydra
Right now the worst case chain of events for building an ISO on Hydra is

    - copy everything to squashfs builder
    - run squashfs builder
    - download squashfs from builder
    - compress squashfs
    - upload squashfs to S3
    - copy squashfs to ISO builder
    - run ISO builder
    - download ISO from builder
    - compress ISO
    - upload ISO to S3

This inlines the squashfs build into the ISO build, which makes it

    - copy everything to ISO builder
    - run ISO builder
    - download ISO from builder
    - compress ISO
    - upload ISO to S3

Which should reduce queue runner load by $alot per ISO, which we have four of on small channels
(one release, one test per arch) and a lot more than four of on large channels (with various desktops)
2024-03-12 15:41:59 +03:00
K900 7d93928492 nixos/release: add Plasma 6 ISO variant 2024-02-28 18:49:33 +03:00
pennae 258b935d70 nixos/filesystems: make supportedFilesystems an attrset
this lets us *dis*able filesystem explicitly, as is required by e.g. the
zfs-less installer images. currently that specifically is only easily
possible by adding an overlay that stubs out `zfs`, with the obvious
side-effect of also removing tooling that could run without the kernel
module loaded.
2024-02-19 11:46:52 +01:00
Nick Cao dfbb7a7c01
Merge pull request #279174 from SuperSandro2000/iso-minimal-override
nixos/installation-cd-minimal: allow overwriting isoImage.edition with mkForce like other options
2024-01-14 15:26:29 -05:00
Cole Mickens 5a718794d0
nixos/lib/make-squashfs.nix: allow disabling compression 2024-01-07 22:46:20 -06:00
Sandro Jäckel eceb5b2f8c
nixos/installation-cd-minimal: allow overwriting isoImage.edition with mkForce like other options
For good measure also changed fontconfig
2024-01-06 15:52:15 +01:00
Jonathan Ringer 9711af0579
nixos/iso-image: fix isoImage.grubTheme = null; logic 2023-11-23 10:58:17 -08:00
Jörg Thalheim 94b810348a installer/cd-dvd/channel: allow to disable bundled channel
When building kexec-based installer every mb saved will reduce the RAM usage and allow to install NixOS on smaller machines.
It also means that less data has to be downloaded from the network.
When using flakes or niv we no longer rely on nix channels beeing present
and when using something like nixos-anywhere, we no longer need to evaluate anything in the installer at all.
2023-11-02 12:39:05 +01:00