Commit Graph

1114 Commits

Author SHA1 Message Date
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
Ryan Lahfa
b42ea74b96
Merge pull request #206655 from vlinkz/distroname
nixos/version: add system.nixos.distroName and system.nixos.distroId options
2023-01-15 17:39:55 +01:00
Victor Fuentes
d3528cdc3d
nixos/version: add config.system.nixos.distroName and config.system.nixos.distroId 2023-01-14 16:19:06 -05:00
Naïm Favier
7e1cf49870
Merge pull request #161237 from miallo/nixos-version-configuration-revision 2023-01-12 12:31:54 +01:00
linsui
a2e21c76c7 rename config.qt5 -> config.qt 2023-01-10 20:50:15 +08:00
Michael Lohmann
3b5456608a nixos-version: print error for missing revision to stderr 2023-01-03 20:40:35 +01:00
Michael Lohmann
c09f6c3db0 nixos-version: output configurationRevision
`nixos-version --configuration-revision` will show the
configurationRevision.
2023-01-03 20:40:35 +01:00
Naïm Favier
a5b7b6e47a
nixos/nixos-enter: hide systemd-tmpfiles errors
Due to missing `/etc/machine-id` in the new root, systemd-tmpfiles
outputs a bunch of scary warnings like "Failed to replace specifiers in
'/run/log/journal/%m'". We only care about /tmp, so hide them.

`-E` is an alias for `--exclude-prefix=/dev --exclude-prefix=/proc
--exclude-prefix=/run --exclude-prefix=/sys`.
2023-01-01 17:18:20 +01:00
Naïm Favier
6a166a5ab1
Merge pull request #199425 from Mikilio/master 2023-01-01 11:15:03 +01:00
Ryan Lahfa
b869fc7a90
Merge pull request #204669 from n8henrie/configurable-grub-efi-timeout
nixos/installer/cd-dvd/iso-image: honor EFI boot timeout
2022-12-30 14:25:26 +01:00
Samuel Dionne-Riel
d5f5ec1628
Merge pull request #207371 from samueldr/feature/new_kernel-no-zfs
nixos: Add new_kernel_no_zfs image variants
2022-12-27 16:14:16 -05:00
Naïm Favier
0d436e1bb6
Merge pull request #207105 from ncfavier/iso-xlibs 2022-12-27 16:19:33 +01:00
K900
2d3cf010fe
Revert "treewide: use nativeBuildInputs with runCommand instead of inlining" 2022-12-26 21:05:35 +03:00
Sandro
5af3f865e8
Merge pull request #206775 from SuperSandro2000/runCommand-nativeBuildInputs 2022-12-25 21:42:05 +01:00
Nathan Henrie
7e1a3e4a8f nixos/installer/cd-dvd/iso-image: Honor boot.loader.timeout for EFI
EFI boot timeout is currently a static 10 whereas syslinux uses
boot.loader.timeout. This changes the EFI config to match.

Some discussion at https://discourse.nixos.org/t/how-to-override-let-variables/23741/2
2022-12-24 09:27:43 -07:00
Samuel Dionne-Riel
d91e1f98fa nixos: Add sd_image_minimal_new_kernel_no_zfs
Support for ZFS, while desirable, is problematic with newer kernel
releases. The stable ZFS release seldom supports the current newest
kernel version, and this makes the new_kernel image basically useless as
it cannot be published, and is not often built with new kernel releases.

This uses a dirty workaround to work around the fact it is impossible to
remove a list item from a modules system list type. Since ZFS support is
conditional to being supported on the current platform, we can fake ZFS
not being supported *for the no-zfs build only*. This overlay is only
added when evaluating the image, nothing else.
2022-12-22 23:07:19 -05:00
Samuel Dionne-Riel
35bb28b367 nixos: Add iso_minimal_new_kernel_no_zfs
Support for ZFS, while desirable, is problematic with newer kernel
releases. The stable ZFS release seldom supports the current newest
kernel version, and this makes the new_kernel iso basically useless as
it cannot be published, and is not often built with new kernel releases.

This uses a dirty workaround to work around the fact it is impossible to
remove a list item from a modules system list type. Since ZFS support is
conditional to being supported on the current platform, we can fake ZFS
not being supported *for the no-zfs build only*. This overlay is only
added when evaluating the iso, nothing else.
2022-12-22 23:00:14 -05:00
Nathan Henrie
3930bcb3c3 Make syslinuxTimeout match documentation
- https://wiki.syslinux.org/wiki/index.php?title=SYSLINUX#TIMEOUT_timeout
- cbe419ed4c/nixos/modules/system/boot/loader/loader.nix (L16)

Fixes https://github.com/NixOS/nixpkgs/issues/207289
2022-12-22 13:25:14 -06:00
Naïm Favier
3a8fd0ef47
nixos/installation-cd-minimal: disable noXlibs
Causes a lot of uncached builds for a negligible decrease in size (822 →
821 MiB currently).
2022-12-21 15:19:37 +01:00
Sandro Jäckel
26f704b545
treewide: use nativeBuildInputs with runCommand instead of inlining 2022-12-18 23:36:40 +01:00
figsoda
6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
Lin Yinfeng
7f220a0422
nixos/installer/netboot-minimal: add missing lib 2022-12-12 09:54:17 +08:00
Izorkin
0c6ce0dbab
nixos/installer/netboot-minimal: enable man 2022-12-09 13:03:49 +03:00
Izorkin
309d6a3185
iso/minimal: use mkForce 2022-12-09 13:03:49 +03:00
Izorkin
191d2115ea
iso/minimal: use minimal profile 2022-12-09 13:03:49 +03:00
zowoq
1ec69621ef nixos/nix-fallback-paths: 2.11.1 -> 2.12.0 2022-12-07 04:42:28 +10:00
Naïm Favier
a6dd75809d
Merge pull request #204178 from ncfavier/iso-filter-nixpkgs 2022-12-05 19:00:03 +01:00
Naïm Favier
364d3609cd
nixos/installer/cd-dvd: use filtered nixpkgs source
Pin the `nixpkgs` registry entry to the *filtered* nixpkgs source to
avoid copying the entire `.git` directory to the ISO when building
from a local checkout.

Also set `to` directly instead of the `flake.outPath` hack.
2022-12-04 14:54:18 +01:00
zowoq
34386263f7 nixos/nix-fallback-paths: 2.11.0 -> 2.11.1 2022-12-01 12:32:15 +10:00
Mikilio
b6c367162c nixos/nixos-enter: add full path for systemd-tmpfiles 2022-11-24 18:15:08 +01:00
Victor Fuentes
4fe9988b89
installation-cd: Remove libsForQt5.full 2022-11-19 19:12:37 -05:00
Victor Fuentes
f4e541427e
calamares-cd: default supporting all locales 2022-11-02 13:59:53 -04:00
Martin Schwaighofer
0c67f190b1 sd-image: remove unnecessary subshell
replace the subshell surrounding this block with cd before and after

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-10-22 12:11:30 +02:00
Martin Schwaighofer
bacef6bb09 dvd-image: replace faketime with --invariant for mkfs.vfat 2022-10-22 12:11:30 +02:00
Martin Schwaighofer
a1d6fd3702 sd-image: replace faketime with --invariant for mkfs.vfat
This is done for sd-images only here, but should probably also be done
for dvd-images.

The --invariant arg should be a better way of making mkfs.vfat deterministic.
The previous version of invoking faketime was building fine and reproducible
when I was compiling an sdimage for aarch64 under emulation.
It was however still logging errors:
ERROR: ld.so: object '/nix/store/1c2cp2709kmvby8ql2n9946v7l52nn50-libfaketime-0.9.9/lib/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/nix/store/1c2cp2709kmvby8ql2n9946v7l52nn50-libfaketime-0.9.9/lib/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
The logged errors were presumably inaccurate somehow as calling
faketime was required for reproducibility, even though the log makes it
looks like it failed.
2022-10-22 12:11:30 +02:00
Martin Schwaighofer
f6ee247a1f sd-image: make firmware partition deterministic
Based on how it works for the EFI partition of an iso-image at
nixos/modules/installer/cd-dvd/iso-image.nix.
2022-10-22 12:11:30 +02:00
Martin Weinelt
373c1a8e43
installer: enable xe-guest-utilities only on x86
Tries to find a target specific makefile for aarch64 which does not
exist.
2022-10-11 15:33:42 +02:00
Martin Weinelt
8f366cbfcc
installer: enable vmware guest support on x86 only
The vmware guest module asserts on this exact condition, so let's only
enable it on that condition.
2022-10-11 15:33:41 +02:00
Maximilian Bosch
3df3bbdc50
nixos/nixos-build-vms: fix eval
Within #193485 (and the previous changes) the internal structure of the
testing driver was changed. Since then, `makeTest` returns the
attributes for the VM test(s) (including `driverInteractive`) inside a
sub-attribute called `test`, so without this change running
`nixos-build-vms` would fail like this:

    error: attribute 'driverInteractive' missing
2022-10-01 20:34:01 +02:00
Christian Kögler
a68239097e
Merge pull request #189113 from MatthewCroughan/mc/pin-installer-registry
pin nixpkgs registry to pkgs.path via nix.settings.registry
2022-10-01 12:49:28 +02:00
Robert Hensing
b463233ff4 nixos/iso-image: Refactor: apply / unshadow 2022-09-29 12:22:51 +02:00
Robert Hensing
f34135a73b nixos/iso-image: Fix eval 2022-09-29 12:19:06 +02:00
Ivan Nikolaenko
f251840237 lib/systems/default.nix: add efiArch suffixes
Move already implemented functionality to the upper level so
it could be used in a more generic way.

Signed-off-by: Ivan Nikolaenko <ivan.nikolaenko@unikie.com>
2022-09-29 08:02:35 +00:00
MatthewCroughan
c40da01e17
Update nixos/modules/installer/cd-dvd/channel.nix
Co-authored-by: Louis Bettens <lourkeur@users.noreply.github.com>
2022-09-26 19:36:13 +01:00
matthewcroughan
31dbd4cb91 nixos/modules/installer/cd-dvd/channel.nix: pin nixpkgs registry to pkgs.path via nix.settings.registry 2022-09-26 16:23:48 +01:00
Robert Hensing
38fb09e427 testing-python.nix: Replace makeTest implementation 2022-09-24 17:38:08 +01:00
Christian Kögler
b3c8810040
Merge pull request #186695 from amarshall/installer-no-mkforce
nixos/installer: mkForce -> mkImageMediaOverride
2022-09-09 17:32:17 +02:00
pennae
3bddcf5f90
Merge branch 'master' into option-docs-md 2022-09-01 16:10:09 +02:00
pennae
1013069f52 nixos/*: convert more partially-md option descriptions
this mostly means marking options that use markdown already
appropriately and making a few adjustments so they still render
correctly. notable for nftables we have to transform the md links
because the manpage would not render them correctly otherwise.
2022-08-31 16:32:14 +02:00
matthewcroughan
2367007613 nixos/modules/installer/cd-dvd/channel.nix: pin nixpkgs registry to pkgs.path via boot.postBootCommands 2022-08-31 14:42:05 +01:00
Eelco Dolstra
9fc7a29da5
nix-fallback-paths.nix: Update to 2.11.0 2022-08-29 08:24:17 +02:00
pennae
6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
Andrew Marshall
37da853f49 nixos/installer: mkForce -> mkImageMediaOverride
This is image media, so use the override level designed for it. As
detailed in the definition for mkImageMediaOverride:

> image media profiles can be derived by inclusion into host config,
> hence needing to override host config, but do allow user to mkForce
2022-08-14 12:14:34 -04:00
pennae
087472b1e5 nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
pennae
93c57a9884
Merge pull request #185056 from pennae/option-docs-md
nixos/*: more option docs conversions
2022-08-05 17:36:49 +02:00
olaf
5a6853b3bf use consistently user alice for examples 2022-08-05 13:13:24 +02:00
pennae
694d5b19d3 nixos/*: replace </para><para> with double linebreaks
our xslt already replaces double line breaks with a paragraph close and
reopen. not using explicit para tags lets nix-doc-munge convert more
descriptions losslessly.

only whitespace changes to generated documents, except for two
strongswan options gaining paragraph two breaks they arguably should've
had anyway.
2022-08-03 20:39:21 +02:00
Alyssa Ross
153bfc9966
treewide: use isx86 where appropriate 2022-07-30 16:21:10 +00:00
Alyssa Ross
5330c0a1af
treewide: use isAarch where appropriate 2022-07-30 16:18:27 +00:00
pennae
a16b25432e
Merge pull request #182685 from pennae/invariant-option-conversions
treewide: invariant option conversions to MD
2022-07-27 15:39:47 +02:00
pennae
4ba72f8615 nixos/installer: invariant option docs MD conversions 2022-07-24 13:01:18 +02:00
Maximilian Bosch
200ce70e63
Merge pull request #180603 from m-bdf/substitute-nix-instantiate
nixos-generate-config: substitute nix-instantiate
2022-07-22 14:22:52 +02:00
Bernardo Meurer
ea8a1ac198 nix-fallback-paths: 2.10.2 -> 2.10.3 2022-07-15 12:00:56 -07:00
Nick Cao
c543c996a9
nix-fallback-paths.nix: Update to 2.10.2 2022-07-14 23:53:44 +08:00
Alyssa Ross
c3fafea4ed nixos: remove unused "system tarball" modules
This has all been commented in nixos/release.nix since at least 2015,
so it's not doing us any good to keep it around.
2022-07-12 07:34:20 +00:00
Maëlys Bras de fer
b2224764ee
nixos-generate-config: substitute nix-instantiate 2022-07-07 18:42:44 +02:00
Linus Heckemann
0808ed8252
Merge pull request #176796 from erikarvstedt/improve-netboot-initrd
nixos/netboot: use `makeInitrdNG` to shrink ramdisk size
2022-07-04 09:23:38 +02:00
Kirill A. Korinsky
08ddd8a5fc
nixos-generate-config: detect parallels virtualization 2022-06-29 16:01:08 +02:00
Profpatsch
0e444785a1 installer/tools/get-version-suffix: set --git-dir
The `nixos-rebuild` tool calls `get-version-suffix` to figure out the
git revision of the nixpkgs directory if there is a .git.

https://nvd.nist.gov/vuln/detail/CVE-2022-24765 made git throw an
error if the .git search logic is not turned off and a user
tries to access a `.git` directory they don’t own (otherwise a
different user could trick them into setting arbitrary git config).

So from now on we should always explicitely set `--git-dir`, which
turns this search logic (and thus the security check) off.
2022-06-27 14:28:03 +02:00
Bernardo Meurer
c7eacbf87e
Merge pull request #177672 from hercules-ci/nixos-generate-config-add-nixpkgs.system
nixos-generate-config: Add nixpkgs.hostPlatform to hardware-configuration.nix
2022-06-23 12:18:20 -04:00
Lassulus
773cbfbd28
Merge pull request #151633 from wucke13/sd-image-experiment
honor `sdImage.compressImage` also in the build process
2022-06-22 14:48:21 +02:00
Robert Hensing
82da0794c2 nixos-generate-config: Make robust against missing newline
The substr solution assumed a newline to be present.
The new solution will not remove the newline if it goes missing in the future.

Apparently this is idiomatic perl.

Thanks pennae for the suggestion!
2022-06-21 14:37:16 +02:00
Robert Hensing
fc0971f436 nixos-generate-config: nixpkgs.system -> nixpkgs.hostPlatform 2022-06-21 14:22:36 +02:00
Robert Hensing
a234fb2a5b nixos-generate-config: Add nixpkgs.system to hardware-config.nix 2022-06-21 14:21:17 +02:00
Martin Weinelt
86c4f203c1
Merge pull request #176475 from vlinkz/calamaresupdates 2022-06-18 10:11:06 +02:00
Florian Klink
50648f568d nixos/…/kexec-boot.nix: move into netboot.nix, rename to kexecTree
`nixos/modules/installer/kexec/kexec-boot.nix` doesn't contain any
custom NixOS config, other than importing `netboot-minimal.nix` (which
imports `netboot-base.nix`, which imports `netboot.nix`.

`netboot.nix` really is just describing a self-contained system config,
running entirely off kernel and initrd, so we might as well move the
kexec script generation there as well.

`netboot.nix` already contains some `system.build` attributes.
Provide a `system.build.kexecTree` attribute (and `kexecScript` for
composability).
2022-06-09 19:59:03 +02:00
Eelco Dolstra
0e51dce778 nix-fallback-paths.nix: Update to 2.9.1 2022-06-09 09:00:27 +10:00
Erik Arvstedt
64589bcefa
nixos/netboot: use makeInitrdNG to shrink ramdisk size
Previously, `makeInitrd` added the whole closure of the squashfs
derivation to initrd.
This closure contains the squashfs.img and some store paths which are
still referenced by the compressed squashfs.img.
These extra store paths are unused in stage 1.

With `makeInitrdNG` only the squashfs.img is added to the initrd.
(`makeInitrdNG` only resolves shared library references instead of the
whole closure).

This shrinks the netboot ramdisk by ~6% for a minimal system and
significantly decreases the size of the uncompressed root filesystem
in stage 1.
2022-06-07 22:34:30 +02:00
Victor Fuentes
54fcba5b3b
installation-cd: prevent gnome from sleeping 2022-06-05 14:10:37 -07:00
Adam Joseph
c0085404bd lib/systems/inspect.nix: remove isPowerPC
Very confusingly, the `isPowerPC` predicate in
`lib/systems/inspect.nix` does *not* match `powerpc64le`!

This is because `isPowerPC` is defined as

  isPowerPC      = { cpu = cpuTypes.powerpc; };

Where `cpuTypes.powerpc` is:

  { bits = 32; significantByte = bigEndian; family = "power"; };

This means that the `isPowerPC` predicate actually only matches the
subset of machines marketed under this name which happen to be 32-bit
and running in big-endian mode which is equivalent to:

  with stdenv.hostPlatform; isPower && isBigEndian && is32bit

This seems like a sharp edge that people could easily cut themselves
on.  In fact, that has already happened: in
`linux/kernel/common-config.nix` there is a test which will always
fail:

  (stdenv.hostPlatform.isPowerPC && stdenv.hostPlatform.is64bit)

A more subtle case of the strict isPowerPC being used instead of the
moreg general isPower accidentally are the GHC expressions:

  Update pkgs/development/compilers/ghc/8.10.7.nix
  Update pkgs/development/compilers/ghc/8.8.4.nix
  Update pkgs/development/compilers/ghc/9.2.2.nix
  Update pkgs/development/compilers/ghc/9.0.2.nix
  Update pkgs/development/compilers/ghc/head.nix

Since the remaining legitimate use sites of isPowerPC are so few, remove
the isPowerPC predicate completely. The alternative expression above is
noted in the release notes as an alternative.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2022-05-25 09:45:42 +02:00
Vladimír Čunát
90e10f361f
Merge #172668: installation-cd: add more guest tools to NixOS graphical installation base 2022-05-19 12:12:10 +02:00
ners
fb4fc93a3e Remove mkDefault 2022-05-17 10:36:59 +02:00
ners
3458d4cf89 installation-cd: remove broken virtualbox module 2022-05-16 12:34:55 +02:00
Eelco Dolstra
5ce31ec2fd
nix-fallback-paths.nix: Update to 2.8.1 2022-05-14 15:19:14 +02:00
Artturi
a0ed85ef29
Merge pull request #165876 from tpwrules/slim-eltorito
iso-image: slim down UEFI El Torito image
2022-05-13 14:30:38 +03:00
ners
49945f07cc installation-cd: add more guest tools to graphical installation base 2022-05-12 09:36:49 +02:00
Janne Heß
e6fb1e63d1
Merge pull request #171650 from helsinki-systems/feat/config-systemd-package
treewide: pkgs.systemd -> config.systemd.package
2022-05-09 10:23:04 +02:00
ajs124
e4a1b1aacd
Merge pull request #171588 from mweinelt/tools-userpkgs
nixos/tools: move firefox into user packages
2022-05-08 19:02:47 +01:00
K900
e994576b0d installation-cd-base: fix eval 2022-05-08 11:08:10 +03:00
Maximilian Bosch
f0bb39d4b7
Merge pull request #167327 from lheckemann/networkd-usedhcp
nixos/networkd: reimplement useDHCP in a sensible way
2022-05-07 00:05:44 +02:00
Maximilian Bosch
f4e5bd8064
nixos/nixos-generate-config: update comment for useDHCP 2022-05-06 16:56:47 +02:00
Janne Heß
57cd07f3a9
treewide: pkgs.systemd -> config.systemd.package
This ensures there is only one systemd package when e.g. testing the
next systemd version.
2022-05-05 20:00:31 +02:00
Martin Weinelt
6051f8028d
nixos/tools: move firefox into user packages
Installing Firefox is a good example for a package that could be
installed as a user, since it is a graphical one.

Also use thunderbird as a second example.
2022-05-05 00:41:55 +02:00
Victor Fuentes
89096bcce0
installation-cd: add calamares-plasma5 cd 2022-05-03 12:19:20 -04:00
Victor Fuentes
67b5b4cabf
installation-cd: add calamares-gnome cd 2022-05-03 12:19:20 -04:00
Bernardo Meurer
78f6f77962
Merge pull request #169113 from ElvishJerricco/systemd-stage-1-installer-tests
nixos: Installer tests for systemd stage 1
2022-04-30 13:18:57 -07:00
Maximilian Bosch
8e42949a24
nixos/nixos-generate-config: use networking.useDHCP by default
Currently we're still using scripted networking by default. A problem
with scripted networking is that having `useDHCP` on potentially
non-existing interfaces (e.g. an ethernet interface for USB tethering)
can cause the boot to hang.

Closes #107908
2022-04-30 00:30:47 +02:00
Bernardo Meurer
80d4480778
sd-image-aarch64: deduplicate cm4 section 2022-04-26 20:23:50 -07:00
Bernardo Meurer
11c1152e0f
sd-image-aarch64: add dtbs for rpi-400 and cm4s 2022-04-26 19:05:24 -07:00
Bernardo Meurer
b30105b7c2
ubootRaspberryCM4_64bit: merge with ubootRaspberryPi4_64bit 2022-04-26 19:05:23 -07:00
Bernardo Meurer
faf42ffbd0
ubootRaspberryCM4_64bit: init 2022-04-26 15:22:25 -07:00
Bernardo Meurer
d1fef1e7c3
sd-image-aarch64: add support for the RaspberryPi CM4 2022-04-26 15:22:24 -07:00
Bernardo Meurer
e8e87beee7
Merge pull request #169047 from helsinki-systems/feat/systemd-stage-1-filesystems
nixos/systemd-stage-1: Fixup most filesystem tasks
2022-04-25 15:02:29 -07:00
Robert Hensing
ecc66a886e
Merge pull request #168945 from Lassulus/kexec-tests
nixosTests.kexec: better test if we are in a new system
2022-04-25 17:17:32 +02:00
Janne Heß
160fb93fdc
nixos/filesystems: Make most simple filesystems compatible with systemd
This includes disabling some features in the initrd by default, this is
only done when the new initrd is used. Namely, ext and bcache are
disabled by default. bcache gets an own enable option while ext is
detected like any other filesystem.
2022-04-24 16:32:34 +02:00
Linus Heckemann
c85bc19cdf
Merge pull request #169303 from emccorson/fix/add-copy-system-config
nixos/tools: add copySystemConfiguration to configuration file template
2022-04-24 00:01:00 +02:00
Pol Dellaiera
b555b64346
nixVersions.stable: 2.7.0 -> 2.8.0 2022-04-21 19:43:40 +02:00
Eric Corson
0edfd89d6e nixos/tools: add copySystemConfiguration to configuration file template 2022-04-19 10:53:47 +01:00
lassulus
e097044b92 nixos/kexec-boot: auto-detect the right kernel name to support aarch64 2022-04-18 20:34:18 +02:00
Will Fancher
f3f2e55e59 nixos: Fix channel copying in installer tests with systemd stage 1 2022-04-17 18:31:35 -04:00
Thomas Watson
0931014baf iso-image: slim down UEFI El Torito image
UEFI firmware does not have to be able to read ISO9660 filesystems, so
the El Torito mechanism provides a way to specify an embedded FAT32
image which contains files the UEFI firmware itself must be able to
read, such as UEFI executables. Once GRUB starts and reads its
configuration, it can access the ISO9660 filesystem to load other files.

This change removes the unused kernel, initrd, and GRUB font files from
the El Torito image, but keeps the GRUB configuration and UEFI
executables. These files have been present since EFI support was
originally introduced in commit 097c656. Other distribution ISOs, such
as Ubuntu 20.04, Fedora 35, and Windows 10 work this way too. This saves
24MiB on x86_64 and 61MiB on aarch64 ISOs.
2022-04-13 20:26:11 -05:00
Florian Klink
8ea2f75b72 nixos/kexec-boot: use dirname of script to resolve bzImage and initrd.gz
This will allow invoking the `kexec-boot` script without `cd`-ing into
its folder first.
2022-04-13 13:26:04 +02:00
Florian Klink
366c8be2ad nixos/installer: add kexec-boot
This module exposes a config.system.build.kexecBoot attribute,
which returns a directory with kernel, initrd and a shell script
running the necessary kexec commands.

It's meant to be scp'ed to a machine with working ssh and kexec binary
installed.

This is useful for (cloud) providers where you can't boot a custom image, but
get some Debian or Ubuntu installation.
2022-04-13 13:25:22 +02:00
Daniel Kilimnik
206e030ce2 installer/cd-dvd/iso-image: add syslinuxTheme config option
It was not possible to change the theme used by syslinux when building an iso image.
2022-03-25 21:37:20 +01:00
Robert Hensing
ce5a33e62b
Merge pull request #164660 from ncfavier/tests-restrict-arguments
nixos/testing: restrict arguments to makeTest
2022-03-24 17:01:47 +01:00
Artturi
6134c2f891
Merge pull request #161034 from andr1an/fix/nixos-generate-config-absolute-root-path 2022-03-22 02:35:06 +02:00
Robert Hensing
6c469679f6 Merge remote-tracking branch 'upstream/master' into tests-restrict-arguments 2022-03-21 23:17:17 +01:00
Robert Hensing
eb8b70c020 nixos: Make config.nix.enable pass test 2022-03-21 23:14:10 +01:00
Artturin
611b8c4472 nixos/nixos-generate-config: fix specifying --root /mnt --dir adir
it should save to `$PWD/adir` instead of `/mnt/adir`
and --dir adir should save to `$PWD/adir` instead of `/adir`
2022-03-18 23:16:19 +02:00
andr1an
00487b5a87 nixos/nixos-generate-config: resolve abspath to root 2022-03-18 23:16:06 +02:00
Ben Wolsieffer
69cff425e6 nixos/nixos-enter: cleanup resolv.conf handling 2022-03-18 12:19:09 -04:00
Ben Wolsieffer
1ee3d9477b nixos/nixos-enter: fix resolv.conf error handling 2022-03-18 12:19:02 -04:00
Nick Cao
3c09fec700
nix-fallback-paths.nix: Update to 2.7.0 2022-03-08 22:40:16 +08:00
Samuel Dionne-Riel
0adf99aee4
Merge pull request #156005 from zhaofengli/pi02
Update Raspberry Pi packages
2022-02-24 15:05:23 -05:00
Jan Tojnar
f9e65e44e5
Merge pull request #160891 from jtojnar/gnome-iso-shortcuts
installation-cd-graphical-gnome: add useful shortcuts to the dash
2022-02-21 07:00:49 +01:00
Maximilian Bosch
1659bca6b7
nixos-build-vms(8): $out/bin/nixos-run-vms should non-interactively start VMs
Not entirely sure when it got broken this time, but when creating a VM
network with `nixos-build-vms(8)`, there are should be the following scripts:

* `$out/bin/nixos-test-driver` which drops into an interactive shell to
  interactively perform test steps.
* `$out/bin/nixos-run-vms` which non-interactively starts the VMs from
  the network so that one can manually play around in the VM.

The latter also starts an interactive shell for a while now which means
that it does the exact same thing as `nixos-test-driver` which is not
its purpose.
2022-02-19 19:43:34 +01:00
Jan Tojnar
e9cade383c installation-cd-graphical-gnome: add useful shortcuts to the dash
The live image is primarily used for installation so we should make
link to manual as well as other useful tools front and center,
instead of having them buried in the app drawer.

The default GNOME apps can still be found there when the ISO
is used for demonstration purposes.
2022-02-19 14:08:32 +01:00
Zhaofeng Li
1781d283f3 sd-image-aarch64: Enable arm_boost for Pi 4
This is effective on the Pi 400 and on newer board revisions of the
Pi 4B. From the official documentation:

> New Raspberry Pi OS images from Bullseye onwards come with
> this setting by default.

<https://www.raspberrypi.com/documentation/computers/config_txt.html>
2022-02-12 00:04:48 -08:00
Zhaofeng Li
963f011f16 sd-image-aarch64.nix: Add config for Pi Zero 2 W 2022-02-12 00:04:48 -08:00
Artturin
b4adac9ba9 nixos/nixos-generate-config: move dhcpConfig from configuration.nix to hardware-configuration.nix 2022-02-09 19:35:19 +02:00
Artturin
aaf13bb3bd nixos/nixos-generate-config: fix proram path replacements
btrfs-progs was made optional in 2019 c01ea27ce3
because it didn't cross-compile. it now does
2022-02-09 18:38:17 +02:00
Artturin
b2eacd1595 nixos/tools: add more keymap options to configuration template 2022-02-09 18:38:17 +02:00
Artturin
801dca549f nixos/tools: add networkmanager to configuration template 2022-02-09 18:38:17 +02:00
Bernardo Meurer
f46347fa66
nix-fallback-paths: update to 2.6.0 2022-01-31 18:53:43 -08:00
polykernel
4a9d9928dc nixos/nix-daemon: use structural settings
The `nix.*` options, apart from options for setting up the
daemon itself, currently provide a lot of setting mappings
for the Nix daemon configuration. The scope of the mapping yields
convience, but the line where an option is considered essential
is blurry. For instance, the `extra-sandbox-paths` mapping is
provided without its primary consumer, and the corresponding
`sandbox-paths` option is also not mapped.

The current system increases the maintenance burden as maintainers have to
closely follow upstream changes. In this case, there are two state versions
of Nix which have to be maintained collectively, with different options
avaliable.

This commit aims to following the standard outlined in RFC 42[1] to
implement a structural setting pattern. The Nix configuration is encoded
at its core as key-value pairs which maps nicely to attribute sets, making
it feasible to express in the Nix language itself. Some existing options are
kept such as `buildMachines` and `registry` which present a simplified interface
to managing the respective settings. The interface is exposed as `nix.settings`.

Legacy configurations are mapped to their corresponding options under `nix.settings`
for backwards compatibility.

Various options settings in other nixos modules and relevant tests have been
updated to use structural setting for consistency.

The generation and validation of the configration file has been modified to
use `writeTextFile` instead of `runCommand` for clarity. Note that validation
is now mandatory as strict checking of options has been pushed down to the
derivation level due to freeformType consuming unmatched options. Furthermore,
validation can not occur when cross-compiling due to current limitations.

A new option `publicHostKey` was added to the `buildMachines`
submodule corresponding to the base64 encoded public host key settings
exposed in the builder syntax. The build machine generation was subsequently
rewritten to use `concatStringsSep` for better performance by grouping
concatenations.

[1] - https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md
2022-01-26 21:04:50 -05:00
Samuel Dionne-Riel
18ebd1c330
Merge pull request #153409 from tpwrules/fix-nonx86-iso-reproducibility
installer/cd-dvd/iso-image: avoid leaking build timestamps on non-x86
2022-01-23 21:15:26 -05:00
0x4A6F
98590033ad
Merge pull request #154372 from zhaofengli/sd-image-rv64-installer
sd-image-riscv64: Add an -installer variant like others
2022-01-24 00:46:24 +01:00
Jörg Thalheim
966ea2c020
Merge pull request #150360 from Enzime/fix-netboot-cmdline
netboot: Support cmdline variable from netboot.xyz
2022-01-19 06:53:04 +00:00
pennae
466cb747c8
Merge pull request #150408 from Enzime/systemd-boot-extra-entries
nixos/systemd-boot: Add `extraEntries` and `extraFiles` options
2022-01-13 07:15:05 +00:00
Zhaofeng Li
ccd4dc3b98 sd-image-riscv64: Add an -installer variant like others 2022-01-10 17:30:02 -08:00
Maciej Krüger
801d832872
Merge pull request #125451 from zhaofengli/qemu-riscv64-sd-image 2022-01-07 22:14:05 +01:00
Zhaofeng Li
2cb7743e9c sd-image-x86_64: init 2022-01-06 17:31:17 -08:00
Zhaofeng Li
b70c23ea61 sd-image: Propagate imageName to derivation 2022-01-06 17:31:17 -08:00
Zhaofeng Li
823acb25dd sd-image-riscv64-qemu: init 2022-01-06 17:23:10 -08:00
Thomas Watson
450ce00ec4 installer/cd-dvd/iso-image: avoid leaking build timestamps on non-x86 2022-01-05 12:05:15 -06:00