Commit Graph

1058 Commits

Author SHA1 Message Date
Robert Hensing
1350e522fa nixos-generate-config: Fix generated hostPlatform.system
While the intent of the code was correct, the system string can not be used
in the substituteAll function.

See https://github.com/NixOS/nixpkgs/issues/237216
2023-06-11 19:28:51 +02:00
Silvan Mosberger
d4fe69faea nix-fallback-paths.nix: Update to 2.15.1 2023-06-01 22:55:14 +02:00
Will Fancher
fe43923a70
Merge pull request #229767 from mberndt123/mberndt123/stratis-rootfs
nixos/stratis: initrd support for stratis root volumes
2023-05-25 14:06:31 -04:00
Ivan Trubach
c68a5bb85a nixos/iso-image: enable BIOS boot by default if possible
The change introduced in commit e5b072eca165430efc4d7a179011a42aab4470a2
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
figsoda
701bcdbead nixos: fix typos 2023-05-19 22:31:04 -04:00
Matthias Berndt
cb410a8c59 Merge remote-tracking branch 'upstream/master' into mberndt123/stratis-rootfs 2023-05-17 21:47:19 -04:00
Matthias Berndt
3aa262b644 make nixos-generate-config generate stratis pool UUIDs 2023-05-15 20:48:10 -04:00
ajs124
30bea8d82d nixos/*: remove boot.grub.version 2023-05-10 21:51:26 +02:00
Alyssa Ross
e5e49df7fd
nixos/netboot: add squashfsCompression option
This is copied from isoImage.squashfsCompression.  It's useful to be
able to customise, as iteration cycles are very slow with xz, and
subjectively systems booted with less efficiently compressed squashfs
stores appear to have faster reads (although I didn't test that
scientificly so there could be other factors).
2023-05-09 14:15:10 +00: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
Rick van Schijndel
5e2d479540
Merge pull request #229874 from mcnesium/fix_ambig_char
fix ambiguous unicode characters
2023-05-06 16:54:54 +02:00
Ryan Lahfa
32264d614a
Merge pull request #227696 from aktaboot/fix-install-tools-deps
nixos/installer: fix util-linux dependencies in install script
2023-05-05 21:58:23 +02:00
aktaboot
b3ef821489 nixos/installer: fix util-linux dependencies in install scripts 2023-05-05 18:11:57 +02:00
mcnesium
36af786eda
fix ambiguous unicode characters 2023-05-04 12:54:56 +02:00
name_snrl
1aa8534f3e nixos/nixos-generate-config: use hostPlatform.system instead of calling nix 2023-04-26 23:51:48 +05:00
Artturi
b83db86a9e
Merge pull request #222080 from Stunkymonkey/nixos-optionalString 2023-04-20 16:07:30 +03:00
R-VdP
3078cdb780 nixos/nixos-generate-config: include new device ID for virtio_scsi
Device IDs found here:
https://devicehunt.com/view/type/pci/vendor/1AF4/device/1048
2023-04-18 18:05:53 +00:00
Sandro
603320b64f
Merge pull request #204534 from SuperSandro2000/boot-tmp 2023-04-12 21:37:47 +02:00
Felix Buehler
327b0cff7a treewide: use more lib.optionalString 2023-04-07 13:38:33 +02:00
github-actions[bot]
6a3714135d
Merge master into staging-next 2023-03-23 00:02:14 +00:00
Ryan Lahfa
54de698c6f
Merge pull request #221576 from paumr/nixos-generate-config_fix_syntax
nixos-generate-config: fix invalid sample config
2023-03-22 20:10:43 +01:00
github-actions[bot]
797a2b9bcc
Merge master into staging-next 2023-03-21 18:01:07 +00:00
K900
4787ebf7ae nixos/hidpi: remove
The single option tries to do too much work, which just ends up confusing people.

So:
- don't force the console font, the kernel can figure this out as of #210205
- don't force the systemd-boot mode, it's an awkward mode that's not supported
  on most things and will break flicker-free boot
- add a separate option for the xorg cursor scaling trick and move it under the xorg namespace
- add a general `fonts.optimizeForVeryHighDPI` option that explicitly says what it does
- alias the old option to that
- don't set any of those automatically in nixos-generate-config
2023-03-21 13:29:57 +01:00
Sandro Jäckel
a5d95ac5fc
nixos/tmp: move /tmp options under boot.tmp 2023-03-19 18:49:37 +01:00
paumr
a6b712f8a4 nixos-generate-config: fix invalid sample config
This issue was reported in #221510
2023-03-17 01:24:28 +01:00
Bernardo Meurer
79cfdf110a
Merge pull request #219351 from tie/make-bios-bootable 2023-03-16 11:33:03 -03:00
Linus Heckemann
7ca65eeecf
Merge pull request #219354 from Izorkin/update-profiles-base
nixos/profiles: optimize base and minimal profiles
2023-03-14 14:45:15 +01:00
Luflosi
1d65c7279c
nixos-generate-config: update microcode only on bare metal
Guest operating systems inside VMs or containers can't update the host CPU's microcode for obvious security reasons, so setting the `hardware.cpu.*.updateMicrocode` options is pointless.
2023-03-13 20:15:13 +01: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
Izorkin
bb5370b8b3
nixos/modules/installer/netboot/netboot-minimal: reduce closure size 2023-03-04 16:19:39 +03:00
Valentin Gagarin
4e0525a8cd configuration.nix: suggest a command line program
adding two graphical programs makes a strong assmuption that users will
use a graphical environment.

add a command line program as an alternative suggestion that is easy to
comment in as a first-steps measure.
2023-02-28 17:16:03 +01:00
Eelco Dolstra
056b679c35 nix-fallback-paths.nix: Update to 2.13.3 2023-02-27 10:40:18 -08:00
Weijia Wang
b65d2ea436
Merge pull request #192672 from amjoseph-nixpkgs/pr/nixos/sd/powerpc64le
enable NixOS installer for powerpc64le
2023-02-23 07:09:46 +02:00
Adam Joseph
f99e8bafe6 nixos/installer: add sd-image-powerpc64le.nix
This builds on top of nixpkgs mainline 00d83471803a8a308a52fc4b09b6ec41dfb36453
with the following two PRs cherry-picked:

- https://github.com/NixOS/nixpkgs/pull/192670
- https://github.com/NixOS/nixpkgs/pull/192668

using the following command:

```
nix build -f nixos -L \
  -I nixos-config=nixos/modules/installer/sd-card/sd-image-powerpc64le.nix \
  config.system.build.sdImage
```

I was able to successfully boot the image, although it boots to a login prompt
rather than a shell, and won't accept the empty password for `root`.  I guess
I'll have to figure out why that is.

To boot the image: `zstd`-decompress the it, mount it, and use `kexec`:

```
cd boot/nixos
kexec -l \
  *-vmlinux \
  --initrd *-initrd \
  --dt-no-old-root \
  --command-line="$(grep APPEND ../extlinux/extlinux.conf | sed 's_^ *APPEND *__')"
```

The machine I used for testing has only one storage device which is completely
allocated to LVM.  It appears that the NixOS ISO loader doesn't look for
partition tables within LVM volumes.  To work aroundn this, I had to extract the
`ext4` image within the partition table within the `sd-card` image and put that
in its own LVM volume.  This likely won't be an obstacle for users who write the
image to a USB stick or similar.
2023-02-23 06:18:52 +02:00
Jason Yundt
b1bb9bb6c8 treewide: fix backwards smart apostrophes
According to the Unicode Standard, you should use U+2019 RIGHT SINGLE
QUOTATION MARK for apostrophes [1]. Before this change, some of the text
in this repo would use U+2018 LEFT SINGLE QUOTATION MARKs instead.

[1]: https://www.unicode.org/versions/Unicode15.0.0/ch06.pdf#G12411
2023-02-06 07:24:42 -05:00
zowoq
b93752ceb0 nixos/nix-fallback-paths: 2.12.0 -> 2.13.2 2023-01-26 22:54:25 +10:00
Nick Cao
c128da46bf
Merge pull request #211640 from Izorkin/update-iso-channel
nixos/installer/cd-dvd: removing duplicate nixpkgs
2023-01-22 16:31:54 +08:00
zowoq
e75ac30903 Revert "nixos/nix-fallback-paths: 2.12.0 -> 2.13.1"
This reverts commit 37a44ff3a0415ab84fe52e9c78ad4bafd227737b.
2023-01-22 09:48:21 +10:00
zowoq
37a44ff3a0 nixos/nix-fallback-paths: 2.12.0 -> 2.13.1 2023-01-21 06:44:18 +10:00
Izorkin
058951e85d
nixos/installer/cd-dvd: removing duplicate nixpkgs 2023-01-19 22:52:45 +03:00
rnhmjoj
2bc5625877
nixos-install: remove root requirement for bind mount
This moves the creation of the bind mount inside the `nixos-enter`
invocation. The command are executed in an unshared mount namespace, so
they can be run as an unprivileged user.
2023-01-19 20:50:17 +01:00
Naïm Favier
556a4a7951 nixos/installation-cd-minimal: include HTML doc
Although we don't really need HTML documentation in the minimal installer,
not including it may cause annoying cache misses in the case of the NixOS manual.
2023-01-19 00:30:33 +01:00
Naïm Favier
cd4f1a1df5
nixos-install: only mount if root 2023-01-17 11:39:34 +01:00
Michele Guerini Rocco
594b94b4c3
Merge pull request #210812 from rnhmjoj/pr-initrd-secrets
boot.initrd.secrets fixes
2023-01-17 00:48:58 +01:00
Jeff Huffman
96ec8c7623 nixos/documentation.man.mandb: Add skipPackages option, and include nixos-version
prevents unnecessary recreation of man caches

Fixes #209835
2023-01-16 22:24:02 +01:00
rnhmjoj
9fc47e6db3
nixos-install: fix missing initrd.secrets paths
When installing NixOS in the target filesystem /mnt, paths relative to
configuration.nix in `initrd.secrets` are turned by Nix into absolute
paths that reference /mnt. While building the system derivation works,
installing the bootloader fails because the latter process takes place
inside the chroot environment where /mnt does not exist.

Ideally, we would also build the system within chroot, but this greatly
complicates the matter as it requires  manually copying over Nix, its
runtime dependencies and all channels. Possibly, this would also break
several assumptions users have about how nixos-install works.

A simpler and safer (but less neat) solution is to temporarily bind
mount all mount points in /mnt under /mnt/mnt to keep the paths
functional while the bootloader is being installed.
This is essentially the workaround described in issue #73404.
2023-01-16 02:31:01 +01:00