Commit Graph

403 Commits

Author SHA1 Message Date
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
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
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
Jörg Thalheim
af459e624e installer/cd-dvd/channel: stop using lib
the lack of with allows lsp's to spot errors better
2023-11-02 12:39:05 +01:00
Samuel Dionne-Riel
2de1bd778c nixos/iso-image: Remove leftover false dichotomy between console/serial
Relying on the built-in UEFI console here was already necessary, so we
are losing nothing by removing the needless `serial` call, which hung
some systems.

This also makes the implementation much easier to understand.

Also, no ugly-font menu anymore!
2023-09-06 14:10:09 -04:00
Samuel Dionne-Riel
7fa7158c60 nixos/iso-image: graphicalGrub -> forceTextMode
This helps keep logic simpler, as what we do is forcing text mode, which
means the non-default case is `truthy`, making things easier to digest
in the config file.

Also renaming this option is considered "internal", since it lives only
within the `iso-image` namespace, and also not a breaking change since
it was not part of a stable release.
2023-09-06 14:09:03 -04:00
Samuel Dionne-Riel
07fb2f4a97 nixos/iso-image: Tear down GOP and rely on console for Linux boot
This solves an issue where *some systems* (tested on Steam Deck) the EFI
GOP may be broken during stage-1.
2023-09-06 14:09:02 -04:00
Samuel Dionne-Riel
47ae07a23f nixos/iso-image: Drop all unneeded FS modules
It's not like the iso-image will be anything else than isohybrid
FAT+iso9660...
2023-09-06 14:09:02 -04:00
Samuel Dionne-Riel
d64b03a339 nixos/iso-image: Re-enable graphics mode
Which ***anyway*** was not disabled correctly. Following changes will
actually disable it.

What this did was disable the "themed" menu driver, but still continued
relying on the gfxterm infra, which in itself is why things were ugly
and weird.
2023-09-06 14:09:02 -04:00
Samuel Dionne-Riel
dd936c21d7 nixos/iso-image: Check GRUB config on build 2023-09-06 14:09:02 -04:00
Samuel Dionne-Riel
8623ac4656 nixos/iso-image: Add common display resolutions
Hey, look at that, grub is the correct way around on a Steam Deck!
2023-09-06 14:09:02 -04:00
Samuel Dionne-Riel
080bff8159 nixos/iso-image: Use intrinsic UEFI console for serial output in GRUB
The `serial` console hangs on some systems. Unknown why.

Anyway, the way this worked right now relied on it telling the user on
the UEFI console how to enable it. So if I understand it correctly, it
will not cause any regression there.
2023-09-06 14:09:02 -04:00
Samuel Dionne-Riel
fad94acaa8 nixos/iso-image: Make modules list easier to manage
With a bash array.

This change is morally a no-op.
2023-09-06 14:09:02 -04:00
K900
f387b065b1 nixos/iso-image: disable graphical GRUB on GNOME ISOs too
It's broken for a lot of people.
2023-09-06 13:36:31 +03:00
Jan Tojnar
08d242047c iso_gnome: Fix evaluation
`qt.enable` option requires `qt.style` to be set.
Previously, this was set in GNOME module but it has been removed
in 622745942b
2023-08-12 19:30:49 +02:00
K900
db9b857e1d nixos/iso-image: fix syntax 2023-07-05 21:49:03 +03:00
lassulus
e4f361f352 installation-cd: enable graphicalGrub 2023-06-29 14:35:54 +02:00
lassulus
363c846d77 nixos/iso-image: make graphical grub configurable 2023-06-29 14:35:54 +02:00
Ivan Trubach
c68a5bb85a nixos/iso-image: enable BIOS boot by default if possible
The change introduced in commit e5b072eca1
breaks backwards compatibility for some users, see
e5b072eca1 (commitcomment-113775008)
https://github.com/NixOS/nixpkgs/pull/219351#discussion_r1139773448

This change updates the implementation to enable BIOS boot if possible
for the build and host platforms, and also assert that BIOS boot is not
enabled for non-x86 host platforms.
2023-05-23 04:43:31 +03:00
ners
afdf7705ad nixos/iso-image: add some types 2023-05-22 13:01:56 +02:00
ners
c281a355fe nixos/iso-image: prepend to ISO menu labels 2023-05-22 11:25:00 +02:00
ajs124
30bea8d82d nixos/*: remove boot.grub.version 2023-05-10 21:51:26 +02:00
Alyssa Ross
096cdeeac4
nixos/iso-image: type isoImage.squashfsCompression 2023-05-09 14:15:02 +00:00
Alyssa Ross
bf7de549b9
nixos/iso-image: targetPlatform -> hostPlatform
This is not a compiler, and therefore does not need to care about the
target platform.
2023-05-08 11:50:06 +00:00
Felix Buehler
327b0cff7a treewide: use more lib.optionalString 2023-04-07 13:38:33 +02:00
Ivan Trubach
905be9f8c5 nixos/iso-image: s/efi/EFI in documentation 2023-03-09 19:07:33 +03:00
Ivan Trubach
e5b072eca1 nixos/iso-image: add an option to disable BIOS boot
This change adds an option to disable legacy BIOS boot support for ISO
images. The implementation uses syslinux package that currently does not
support non-x86 platforms and thus cannot be cross-compiled, e.g. from
AArch64 system.
2023-03-09 19:07:33 +03:00