Commit Graph

1120 Commits

Author SHA1 Message Date
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
pennae
3ad8f52de0 nixos-install: copy channels before system eval
since fc614c37c6 nixos needs access to its
own path (<nixpkgs/nixos>) to evaluate a system with documentation.
since documentation is enabled by default almost all systems need such
access, including the installer tests. nixos-install however does not
ensure that a channel exists in the target store before evaluating the
system in that store, which can lead to `path is not valid` errors.
2022-01-05 18:38:49 +01:00
Michael Hoang
1783cfde53 nixos/nixos-enter: Don't passthru TMPDIR
`mktemp` tries to use the `TMPDIR` from `nixos-install` outside of the
`chroot` instead of `/tmp` inside the `chroot` and fails. For some
reason the `TMPDIR` is being passed through the `chroot` call.

I haven't tested if other environment variables are being passed through
that shouldn't be.
2021-12-31 10:10:14 +11:00
Michael Hoang
7e7510de4a netboot: Support cmdline variable from netboot.xyz 2021-12-23 18:57:02 +11:00
wucke13
121e2f7e15 honor sdImage.compressImage in intermediate build steps 2021-12-21 21:31:44 +01:00
Victor Engmark
e0f1682910 nixos/installer: Quote variable references
See <https://github.com/koalaman/shellcheck/wiki/SC2086>.
2021-11-26 18:58:08 +13:00
Victor Engmark
c9a7385997 nixos/installer: Use -n instead of ! -z
See <https://github.com/koalaman/shellcheck/wiki/SC2236>.
2021-11-26 18:55:53 +13:00
Victor Engmark
adb8f5c858 nixos/installer: Mark scripts as Bash for ShellCheck
See <https://github.com/koalaman/shellcheck/wiki/SC2239>.
2021-11-26 18:54:23 +13:00
Graham Christensen
6cfd23fa0b nixos-install: support --no-root-password 2021-11-22 22:09:50 +02:00
Ryan Burns
2175b157ac treewide: refactor isi686 && isx86_64 -> isx86 2021-11-20 17:50:41 -08:00
Artturin
f93a7f8b56 nixos-generate-config: automatically enable microcode updates 2021-11-15 22:28:41 +02:00
Eelco Dolstra
58a9cca8cd
nix-fallback-paths.nix: Update to 2.4 2021-11-09 10:47:10 -08:00
Artturin
9145f833cc nixos/nixos-enter: bind mount /etc/resolv.conf to chroot 2021-10-30 18:46:14 +03:00
Janne Heß
b071aea8d0
nixos/nixos-enter: Add IN_NIXOS_ENTER variable 2021-10-13 13:05:54 +02:00
Eelco Dolstra
a47875938d
nix-fallback-paths.nix: Update to 2.3.16 2021-10-07 17:33:53 +02:00
Jacek Galowicz
d68f1e43df
Merge pull request #126713 from blaggacao/nixos-test-ref/05-class-ify-test-driver
nixos test ref/05 class ify test driver
2021-10-07 14:37:01 +02:00
Maximilian Bosch
b2e59bcf77 nixos/build-vms: fix eval 2021-10-05 14:38:48 -05:00
David Arnold
b0fc9da879 nixos/test/test-driver: Class-ify the test driver
This commit encapsulates the involved domain into classes and
defines explicit and typed arguments where untyped dicts where used.

It preserves backwards compatibility through legacy wrappers.
2021-10-05 14:38:48 -05:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
github-actions[bot]
91c89490cc
Merge master into staging-next 2021-09-14 18:01:05 +00:00
Artturi
045bf139db
Merge pull request #104828 from matthewbauer/add-disableInstallerTools-option 2021-09-14 20:41:02 +03:00
github-actions[bot]
2341511023
Merge staging-next into staging 2021-08-18 00:01:59 +00:00
Dominik Xaver Hörl
c62f911507 top-level: move linux kernels, packages and related functions to linux-kernels.nix 2021-08-12 12:22:03 +02:00
David Arnold
9e42d02047
lib/modules: add mkImageMediaOverride
so the underlaying use case of the preceding commit is so
generic, that we gain a lot in reasoning to give it an
appropriate name.

As the comment states:
image media needs to override host config short of mkForce
2021-08-03 18:28:14 -05:00
David Arnold
2af2d3146d
nixos/boot-media: soft-force entire fs layout
https://github.com/NixOS/nixpkgs/pull/131760 was made to avo
a speicific configuration conflict that errored out for multiple definitions of "/" when the installer where overlayed
on any existing host configuration.

---

Problem 1: It turns out that in also other mountpoints can coflict.

Solution 1: use `mkOverride 60` for all mountpoints (even for the ones unlikely causing confilct for consistency sake)

---

Problem 2: It turns out that on an installation media for a fresh machine (before formatting), we usually don't have any devices yet formatted. However defining for example `fileSystems.<nme>.device = "/dev/disk/by-label/...", in newer versions of nixos, seems to make the system startup fail. Similarily waiting for a non-existent swap device does not make the startup fail, but has a 1:30 min timeout.

Solution 2: For an installation medium, soft-override ("unless users know what they are doing") the entire `fileSystems` and `swapDevices` definitions.
2021-08-03 15:05:52 -05:00
Eelco Dolstra
512ee6db39
nix-fallback-paths.nix: Update to 2.3.15 2021-07-28 22:45:33 +02:00
David Arnold
c219fdffad
nixos/installer: force root fs type
installer media can be used on top of existing host configs. In such
scenarions, root fs types will already be defined.

Before this change, this will inevitably lead to the following error:
```console
error: The option `fileSystems./.fsType' has conflicting definition values:
       - In `/nix/store/2nl5cl4mf6vnldpbxhrbzfh0n8rsv9fm-source/DevOS/os/hardware/common.nix': "ext4"
       - In `/nix/store/jbch90yqx6gg1h3fq30jjj2b6h6jfjgs-source/nixos/modules/installer/cd-dvd/iso-image.nix': "tmpfs"
```

With this patch, the installers will override those values according to
their own local requirement.

Use `mkOverride 60` so that conscientious overriding specially targeted
at the installer, e.g. with `mkForce` is still straight forward.
2021-07-28 15:05:25 -05:00
Maximilian Bosch
e66237af15
nixStable: 2.3.12 -> 2.3.14
Changes: https://github.com/NixOS/nix/compare/2.3.12...2.3.14

Since this is a bugfix release that wasn't pushed to `nixpkgs`, I
decided to take care of it.

As it's usually done in `upload-release.pl`[1], I updated the
fallback-paths accordingly and used eval `1687468`[2] for this with Nix
2.3.14.

Also added a fallback-path for `aarch64-darwin` as Nix 2.3.14 seems to
support this now[3].

[1] https://github.com/NixOS/nix/blob/2.3-maintenance/maintainers/upload-release.pl
[2] https://hydra.nixos.org/eval/1687468
[3] 14262b86cc
2021-07-20 17:06:51 +02:00
Robert Helgesson
231a31be87 nixos-option: add backwards compatibility layer
This adds a basic `nixos-option/default.nix` file to provide some
measure of backwards compatibility with Nixpkgs prior to
ce6f17f953.
2021-07-10 22:32:26 +02:00
Robert Helgesson
ce6f17f953
nixos-option: init at <unversioned> 2021-07-09 08:59:12 +02:00
jakobrs
2e4849b841 installation-cd-base.nix: Add 'live.nixos.passwd' boot option
For interactive SSH access to a system without a (working)
keyboard and monitor, without rebuilding the image itself.
2021-07-03 09:53:16 +02:00
Timothy DeHerrera
7e59c19715 nixos-option: remove if nix.package is unstable
This was done in a0a61c3e34, but users
typically install `nixUnstable` via `nix.package`, not by overlaying
`pkgs.nix` directly.
2021-06-29 16:13:52 -07:00
Sandro
5faf13ddad
Merge pull request #119657 from syncom/syncom/deterministic-efiimg 2021-06-26 21:50:20 +02:00
Florian Klink
1db54a5522 nixos/sdcard: make firmware partition offset configurable
Different boards using u-boot SPL require to write to different
locations. Sometimes, the 8MiB gap isn't sufficient - rk3399 boards
write to 0x16384 for example, which is at 8MiB, thus overriding the
fat32 partition with the SPL.
2021-06-25 22:33:42 +02:00
jakobrs
ea34fe21e1 treewide: Use fileSystems.<name>.depends option where necessary 2021-06-08 18:52:02 +02:00
Samuel Dionne-Riel
20b023b5ea iso-image: Improve disk detection
This should help in rare hardware-specific situations where the root is
not automatically detected properly.

We search using a marker file. This should help some weird UEFI setups
where the root is set to `(hd0,msdos2)` by default.

Defaulting to `(hd0)` by looking for the ESP **will break themeing**. It
is unclear why, but files in `(hd0,msdos2)` are not all present as they
should be.

This also fixes an issue introduced with cb5c4fcd3c
where rEFInd stopped booting in many cases. This is because it ended up
using (hd0) rather than using the `search` which was happening
beforehand, which in turn uses (hd0,msdos2), which is the ESP.
Putting back the `search` here fixes that.
2021-05-22 20:04:05 -07:00
Samuel Dionne-Riel
c9bb054dd6 iso-image: unqualified root → ($root)
This technically changes nothing. In practice `$root` is always the
"CWD", whether searched for automatically or not.

But this serves to announce we are relying on `$root`... I guess...
2021-05-22 20:04:05 -07:00
Samuel Dionne-Riel
15eaed0718 iso-image: change date on all files
It may be that in some conditions dates earlier than 1980 on FAT on GRUB
2.06~ish will cause failures

https://github.com/NixOS/nixpkgs/issues/123376#issuecomment-845515035
2021-05-22 20:04:05 -07:00
Samuel Dionne-Riel
f93f0e72e9 iso-image: Force gfxmode
https://www.gnu.org/software/grub/manual/grub/html_node/gfxmode.html
2021-05-22 20:04:05 -07:00
Ning Shang
657e924ad8
iso-image: More concise code for fixed order mmd and mcopy operations
Thanks @misuzu for the suggestions.
2021-05-20 12:17:04 -07:00
Ning Shang
4db7eb476f
iso-image: Workaround for better determinism in du output
The value of du output depends on the underlying file system, and thus is not fully deterministic. This workaround rounds up the disk usage size to the nearest multiple of 1MB, to increase the probability that two du output values on two different file systems fall within the same 1MB window. Note that this workaround won't make du output 100% reproducible, but will increase the probability of getting deterministic builds across different file systems.
2021-05-20 11:01:17 -07:00
Ning Shang
e3cd644458
iso-image: Use fixed-order mcopy instead of file globbing
mcopy file globbing is non-deterministic with respect to the underlying file
system. As a result, the current mcopy approach is less likely to reproduce
efi.img on different machines. We replace mcopy file globbing with
fixed-order mmd and mcopy operations for better determinism. We also use
faketime on mmd for the same reason. We use faketime, mmd, and mcopy
directly, becase they are already in PATH.

Thank misuzu@ for the feedback.
2021-05-17 09:56:51 -07:00
Eelco Dolstra
b08e223a04 nix: 2.3.10 -> 2.3.11
The patch is included in the new release, so can be dropped.

Co-authored-by: Alyssa Ross <hi@alyssa.is>
2021-05-14 12:24:54 +00:00
Alyssa Ross
195d532a63
Revert "Revert "Revert "nix: 2.3.10 -> 2.3.11"""
This reverts commit 66fc303070.

There is still a patch that doesn't apply.
2021-05-14 11:35:18 +00:00
Eelco Dolstra
66fc303070
Revert "Revert "nix: 2.3.10 -> 2.3.11""
This reverts commit 1872bbdae5.
2021-05-14 13:33:05 +02:00
Alyssa Ross
1872bbdae5
Revert "nix: 2.3.10 -> 2.3.11"
This reverts commit 6f6b2cdc98.

Version wasn't updated, and apparently a patch didn't apply.  Let's do
this upgrade properly, in a PR, but for now I'm reverting so we don't
have a broken nix package in master.
2021-05-14 11:30:55 +00:00
Eelco Dolstra
6f6b2cdc98
nix: 2.3.10 -> 2.3.11 2021-05-14 13:11:26 +02:00
Samuel Dionne-Riel
37f14fa4d9
Merge pull request #121450 from samueldr/feature/cross-uefi-iso
iso-image: Fixes for cross-compilation
2021-05-10 14:42:59 -04:00
Samuel Dionne-Riel
79752e2310
Merge pull request #121834 from samueldr/feature/raspberrypi4-image-cleanup
sd_image_raspberrypi4: Remove, as planned initially
2021-05-10 14:05:02 -04:00
Jan Tojnar
468cb5980b gnome: rename from gnome3
Since GNOME version is now 40, it no longer makes sense to use the old attribute name.
2021-05-08 09:47:42 +02:00
Samuel Dionne-Riel
6cb46a3897 sd_image_raspberrypi4: Remove, as planned initially
The replacement is the generic AArch64 image.

From there, you can customize an image that works better for your
needs, if need be.
2021-05-05 16:19:13 -04:00
Samuel Dionne-Riel
1cb977c858 sd-image: Rely on profiles/all-hardware.nix
This ensures that SD images and UEFI installers don't drift in
compatibility with regards to early initrd.
2021-05-04 19:42:13 -04:00
Samuel Dionne-Riel
556fc32d69 iso-image: Build using strictDeps 2021-05-04 19:37:49 -04:00
Samuel Dionne-Riel
f1100e1506 iso-image: Add support for armv7l-linux 2021-05-04 19:37:49 -04:00
Samuel Dionne-Riel
d053c05d19 iso-image: Fixes for cross-compilation
Note that here, since it's not a in a callPackage call, splicing won't
work on nativeBuildInputs.
2021-05-04 19:37:48 -04:00
Samuel Dionne-Riel
cb5c4fcd3c iso-image: Hide rEFInd from menu in known non-working situations
Looks like GRUB has issues loading EFI binaries from (cd0), which is
what would be used in e.g. qemu with OVMF with `-cdrom`. Apparently also
what is used with AArch64 + U-Boot USB.
2021-05-01 19:53:14 -04:00
Samuel Dionne-Riel
9413da26fd iso-image: Provide the right rEFInd binary 2021-05-01 19:53:14 -04:00
Samuel Dionne-Riel
189507a35d iso-image: Make graphical output work properly on AArch64
The serial output (but it's named console, not serial actually) causes
issues on U-Boot's EFI, at the very least.

This is inspired by OpenSUSE's approach:

 * https://build.opensuse.org/package/view_file/Base:System/grub2/grub2-SUSE-Add-the-t-hotkey.patch

Where they add a hidden menu entry, which can be used to force the
console output.

The `echo` will be visible on the serial terminal (grub "console"),
while the graphical interface is shown. Note that input in the serial
terminal (grub "console") will continue controlling the graphical
interface. Useful if you have an SBC connectedinto an HDMI monitor, but
no keyboard connected to it.
2021-05-01 19:53:13 -04:00
Samuel Dionne-Riel
20d0824b15 iso-image: Fix grub file load location
With U-Boot UEFI, (hd0) is not the USB drive, it is (cd0).

Though, it turns out we never needed to prefix the path!
2021-05-01 19:48:57 -04:00
Colin L Rice
bef4bda8dd sd-image: Add option to control sd image expansion on boot.
This is supeer useful to allow the normal sd-image code to be used by
someone who wants to setup multiple partitions with a sd-image.

Currently I'm manually copying the sd-image file and modifying it
instead.
2021-04-30 22:12:07 -04:00
Jörg Thalheim
c534a8434f
nixos-install: fix flake command 2021-04-24 11:49:59 +02:00
Jörg Thalheim
e9cf66e042
configuration template: improve docs on nano 2021-04-21 05:43:50 +02:00
Jörg Thalheim
20e0c6d583
configuration template: add hint to install editor (#105771)
fixes #25376
2021-04-20 21:20:03 +01:00
rnhmjoj
61b7cab481
treewide: use perl.withPackages when possible
Since 03eaa48 added perl.withPackages, there is a canonical way to
create a perl interpreter from a list of libraries, for use in script
shebangs or generic build inputs. This method is declarative (what we
are doing is clear), produces short shebangs[1] and needs not to wrap
existing scripts.

Unfortunately there are a few exceptions that I've found:

  1. Scripts that are calling perl with the -T switch. This makes perl
  ignore PERL5LIB, which is what perl.withPackages is using to inform
  the interpreter of the library paths.

  2. Perl packages that depends on libraries in their own path. This
  is not possible because perl.withPackages works at build time. The
  workaround is to add `-I $out/${perl.libPrefix}` to the shebang.

In all other cases I propose to switch to perl.withPackages.

[1]: https://lwn.net/Articles/779997/
2021-03-31 21:35:37 +02:00
David Arnold
6bfaed9b2c
installer: fixup sd-card folder move from #110827 2021-02-21 16:12:54 -05:00
David Arnold
68afbf9d63 installer: add deprecation warning about sd-card file move 2021-02-19 19:00:19 -05:00
David Arnold
481f68f1a5 installer: add back-compat files for sd-card image folder move 2021-02-19 19:00:19 -05:00
David Arnold
3c744bf68d installer: split sd-card into installer & base for bespoke image 2021-02-19 19:00:19 -05:00
David Arnold
3323b0ff0d
installer: move ./cd-dvd/sd-card* -> ./sd-card/ 2021-02-19 18:56:23 -05:00
Arian van Putten
5276ebb5ee nixos: Get rid of systemConfig kernel parameter
It was introduced in c10fe14 but removed in c4f910f.

It remained such that people with older generations in their boot
entries could still boot those. Given that the parameter hasn't had any
use in quite some years, it seems safe to remove now.

Fixes #60184
2021-02-18 12:48:08 +01:00
WORLDofPEACE
452f7e14d4 nixos/tools: generate an xserver config
The desktop configuration won't enable xserver.
If there's multiple desktops enabled they will now evaluate properly.
2021-02-13 18:46:01 -05:00
WORLDofPEACE
94f0210e60 nixos/tools: make desktopConfiguation types.listOf types.lines
This fixes #108124.
2021-02-13 18:45:27 -05:00
John Ericson
9c213398b3 lib: Clean up how linux and gcc config is specified
Second attempt of 8929989614589ee3acd070a6409b2b9700c92d65; see that
commit for details.

This reverts commit 0bc275e634.
2021-01-23 10:01:28 -05:00
Jonathan Ringer
0bc275e634
Revert "lib: Clean up how linux and gcc config is specified"
This is a stdenv-rebuild, and should not be merged
into master

This reverts commit 8929989614.
2021-01-22 14:07:06 -08:00
John Ericson
8929989614 lib: Clean up how linux and gcc config is specified
The `platform` field is pointless nesting: it's just stuff that happens
to be defined together, and that should be an implementation detail.

This instead makes `linux-kernel` and `gcc` top level fields in platform
configs. They join `rustc` there [all are optional], which was put there
and not in `platform` in anticipation of a change like this.

`linux-kernel.arch` in particular also becomes `linuxArch`, to match the
other `*Arch`es.

The next step after is this to combine the *specific* machines from
`lib.systems.platforms` with `lib.systems.examples`, keeping just the
"multiplatform" ones for defaulting.
2021-01-21 22:44:09 -05:00
Robert Hensing
d51d15e1cf
Merge pull request #109665 from prusnak/stdenv-lib-nixos
nixos/modules: stdenv.lib -> lib
2021-01-19 23:50:30 +01:00
Jonathan Ringer
e2fcf81d2a nixos/modules: pkgconfig -> pkg-config 2021-01-19 01:16:25 -08:00
Pavol Rusnak
66dc9dbb59
nixos/modules: stdenv.lib -> lib 2021-01-17 21:40:51 +01:00
Domen Kožar
c32f5b22f1
move nixos-rebuild into pkgs 2021-01-15 20:07:38 +01:00
Atemu
2fcab516c4 iso-image: enable XZ compress filter
Minimal ISO:
1m21 -> 2m25
625M -> 617M

Plasma5 ISO:
2m45 -> 5m18
1.4G -> 1.3G

Decompression speed stays about the same. It's just a few seconds for the whole
image anyways and, with that kind of speed, you're going to be bottlenecked by
IO long before the CPU.
2021-01-15 17:17:52 +01:00
Alyssa Ross
6c3d21aff9
nixos/getty: rename from services.mingetty
It's been 8.5 years since NixOS used mingetty, but the option was
never renamed (despite the file definining the module being renamed in
9f5051b76c ("Rename mingetty module to agetty")).

I've chosen to rename it to services.getty here, rather than
services.agetty, because getty is implemantation-neutral and also the
name of the unit that is generated.
2021-01-05 09:09:42 +00:00
Samuel Dionne-Riel
4e75a31e98 linux: configure aarch64 contiguous memory allocator via kernel config
As per the in-line comment, this is where distros should configure it.
Not via kernel command line parameters.

As found by looking at the implementation, while exploring the cause of
a bug on the Raspberry Pi 4, it was found that `cma=` on the command
line parameters will overwrite the values a device tree will have
configured for a given platform.

With this, the more recent 5.4 vendor kernel boots just fine on the
Raspberry Pi 4 using our common configuration.
2020-12-31 18:20:49 +01:00
Samuel Dionne-Riel
f9d5de05d2 sd-image-raspberrypi4: Use u-boot for booting
This includes setting up everything for the mainline Raspberry Pi 4
image.

In fact, the only difference left in the Raspberry Pi 4-specific image
is the kernel from the vendor.
2020-12-31 18:20:49 +01:00
Niklas Hambüchen
5604a20762
Merge pull request #80769 from chkno/nixos-enter-tmp
nixos/nixos-enter: Create /tmp
2020-12-31 01:37:41 +01:00
Silvan Mosberger
4a8ea93127
Merge pull request #65609 from jslight90/patch-2
nixos/sd-image-aarch64: update deprecated option
2020-12-23 00:19:09 +01:00
Tom Fitzhenry
9d92c9d0a7 iso-image: add 'serial console' boot entry
Prior to this commit, installation over serial console would requiring
manually having to modify the kernel modeline, as described in
https://github.com/NixOS/nixpkgs/issues/58198 .

This is unnecessarily fiddly, so this commit adds a syslinux boot
entry that has serial enabled.

GRUB already has a serial console entry:
2c07a0800a/nixos/modules/installer/cd-dvd/iso-image.nix (L311-L317)

Why 115200 bps? This is already used in other places, e.g. https://github.com/NixOS/nixpkgs/pull/58196

I tested this change by building the image, booting the image, and
observing the boot process over serial:

    $ cd nixos/
    $ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix default.nix
    $ sudo cp /nix/store/arcl702c3z8xlndlvnfplq9yhixjvs9k-nixos-20.09pre-git-x86_64-linux.iso/iso/nixos-20.09pre-git-x86_64-linux.iso /dev/sdb

    $ picocom -b 115200 /dev/ttyUSB0
2020-12-22 16:16:15 +08:00
Eelco Dolstra
a8c49a97a6
nix: 2.3.9 -> 2.3.10 2020-12-18 12:33:49 +01:00
Matej Urbas
aa38540423 nixos/sd-image: explicit reference to the gawk package
The `awk` command is not installed in the standard env. So this command fails if the `awk` command is not installed by some external module.
2020-12-12 15:43:09 +00:00
Jörg Thalheim
11ee543052
sd-image: fix resizing if root is not the second partition. 2020-12-02 21:52:38 +01:00
Matthew Bauer
62e723f5aa installers/tools: add system.disableInstallerTools option
This option can be set to disable installer tools like nixos-rebuild,
nixos-install, and nixos-generate-config (as well as more). This is
nice when a system is not expected to be rebuild or reconfigure itself
such as in a stateless PXE setup, as well as other embedded scenarios.
Note, that the system can still be updated, but it must either get
nixos-rebuild from another source, or, for embedded systems, be
upgraded by another machine like:

  nix copy "$system" --to "ssh://root@<host>" && ssh "root@<host>"
  "nix-env -p /nix/var/nix/profiles/system --set $system && $system/bin/switch-to-configuration switch".

Along with other options, this allows removing Perl from a closure.
For example:

{
  boot.enableContainers = false;
  environment.defaultPackages = [];
  system.disableInstallerTools = true;
}

should not include Perl.
2020-11-24 18:22:11 -06:00
Graham Christensen
bc49a0815a
utillinux: rename to util-linux 2020-11-24 12:42:06 -05:00
Eelco Dolstra
80097e57c9
nix: 2.3.8 -> 2.3.9 2020-11-20 13:03:04 +01:00
Victor Nawothnig
27e9328895 Support virtio_scsi devices on nixos-generate-config 2020-11-04 10:00:28 +01:00
hyperfekt
1338647a8c nixos-install: pass through keep-going flag 2020-10-31 17:13:45 +01:00
WORLDofPEACE
7b3b82f7af
Merge pull request #100136 from xaverdh/nixos-install-support-impure
nixos-install: pass through impure flag
2020-10-31 01:17:07 -04:00
Andreas Rammhold
1088f05940
Merge pull request #101598 from andir/nixos-build-vms-qemu
nixos/tests: follow-up to the closure reduction PR
2020-10-26 14:19:45 +01:00
WORLDofPEACE
4d71306596
Merge pull request #101516 from worldofpeace/gnome-polishing
GNOME polishing from Q.A findings
2020-10-25 18:41:34 -04:00
Andreas Rammhold
d4fb7daafd
nixos-build-vms: use the driverInteractive attribute instead
This reverts commit aab534b894 & uses the
driverInteractive attribute for the test driver instead.

This has the same effect but removes the extra module in the
nixos-build-vms code.
2020-10-25 20:14:53 +01:00
WORLDofPEACE
ef803ab1bb
Merge pull request #100199 from worldofpeace/seeded-config
nixos/tools: add desktopConfiguration option (to seed configuration into configuration.nix)
2020-10-24 11:35:33 -04:00
WORLDofPEACE
39d1599767 installation-cd-graphical-gnome: add firefox to favorite-apps 2020-10-24 11:14:44 -04:00
Maximilian Bosch
aab534b894
nixos/nixos-build-vms: use pkgs.qemu for virtualisation
When I test a change e.g. in the module system manually, I usually use
`nixos-build-vms(8)` which also gives me a QEMU window where I can play
around in the freshly built VM.

It seems as this has changed recently when the default package for
non-interactive VM tests using the same framework was switched to
`pkgs.qemu_test` to reduce the closure size. While this is a reasonable
decision for our CI tests, I think that you really want a QEMU window of
the VM by default when using `nixos-build-vms(8)`.

[1] bc2188b083
2020-10-23 17:37:57 +02:00
Eelco Dolstra
d28565a1c6
nix: 2.3.7 -> 2.3.8 2020-10-22 14:47:55 +02:00
WORLDofPEACE
99d5111246 nixos/tools: add desktopConfiguration option
We now have a GNOME ISO so it would be nice to seed that one
with configuration on how to enable it.
2020-10-12 22:03:16 -04:00
WORLDofPEACE
2d6a694842 nixos/tools: add firefox to systemPackages example
This is in the graphical iso's.
2020-10-10 22:44:56 -04:00
WORLDofPEACE
3b20eb47f1 nixos/tools: don't call Plasma KDE 2020-10-10 22:44:56 -04:00
WORLDofPEACE
9f1a43cefa nixos/tools: comment about libinput 2020-10-10 22:44:56 -04:00
WORLDofPEACE
12825bc21f nixos/tools: don't mention pinentryFlavor
We don't need to actually set this as it find a good
default automatically. This could confuse the user into thinking they need
to set it themselves.
2020-10-10 22:44:55 -04:00
Dominik Xaver Hörl
bb61cce82a nixos-install: pass through impure flag 2020-10-10 10:05:15 +02:00
WORLDofPEACE
0d47426f37
Merge pull request #99615 from andir/use-configured-nix-for-installer
nixos/installer: use the configured nix package for nixos-install
2020-10-05 21:00:29 -04:00
Andreas Rammhold
544059b01f
nixos/installer: drop the extra nixUnstable in nixos-install
The only nix version available in the installer should be the version
configure in the module system. If someone needs `nixUnstable` in their
`nixos-install` they should probably set the module option and not just
add it to the closure.
2020-10-06 01:11:09 +02:00
Cole Helbling
3bbe4c322a
nixos-install: use mountpoint as store
Otherwise, it's possible building a flake may cause the live CD to run
out of memory.
2020-10-03 10:09:20 -07:00
Eelco Dolstra
b551f06097 nixos-generate-config: Add missing newline 2020-10-03 10:48:39 +02:00
WORLDofPEACE
1343164249 nixos-rebuild: add impure 2020-09-28 17:24:37 -04:00
Graham Christensen
d9a93852d4
nixos-rebuild: support --upgrade-all and document --upgrade (#83327) 2020-09-25 17:22:11 +02:00
zowoq
74c2ed9e35 nixos/tools/nixos-install: remove trailing whitespace 2020-09-21 09:35:27 +10:00
WORLDofPEACE
684d691c6e
Merge pull request #97738 from cole-h/build-vm-for-flakes
nixos-rebuild: add flake support for build-vm
2020-09-20 15:10:16 -04:00
Cole Helbling
e26b348689
nixos-rebuild: add flake support for build-vm
This relies on users using `nixpkgs.lib.nixosSystem` to define their
system; otherwise, the `vm` and `vmWithBootLoader` attributes will not
exist.
2020-09-17 11:44:47 -07:00
WORLDofPEACE
a39ad85726
nixos/tools/nixos-install: add jq to path 2020-09-11 13:03:03 -04:00
WORLDofPEACE
d0972c9637
Merge pull request #95194 from ju1m/nixos-install
nixos-install: add support for flakes
2020-09-05 15:31:14 -04:00
Julien Moutinho
b03c506178 nixos-install: add support for flakes 2020-09-04 06:56:09 +02:00
Julien Moutinho
c6a3a0f4f5 nixos-rebuild: do not depend on nix.conf to activate flakes 2020-09-04 06:56:09 +02:00
WORLDofPEACE
18348c7829
Merge pull request #96042 from rnhmjoj/loaOf
treewide: completely remove types.loaOf
2020-09-02 08:45:37 -04:00
rnhmjoj
20d491a317
treewide: completely remove types.loaOf 2020-09-02 00:42:50 +02:00
V
e08bcdbec3 nixos-rebuild: don't quote $EDITOR
$EDITOR is allowed to contain flags, so it is important to allow the
shell to split this normally. For example, Sublime Text needs to be
passed --wait, since otherwise it will daemonise.
2020-08-29 09:54:14 +02:00
V
be193a2057 nixos-rebuild: make 'edit' work with directories
$NIXOS_CONFIG can be set to a directory, in which case the file used
is $NIXOS_CONFIG/default.nix. This updates 'nixos-rebuild edit' to
handle that case correctly.
2020-08-29 09:54:02 +02:00
Richard Marko
170e1afd84 nixos/sdImage: add postBuildCommands
This allows to perform `dd if= of=$img` after the image is built
which is handy to add e.g. uBoot SPL to the built image.

Instructions for some ARM boards sometimes contain this step
that needs to be performed manually, with this patch it can be
part of the nix file used to built the image.
2020-08-27 20:18:18 +02:00
Ben Wolsieffer
23b4356a5f nixos/nixos-*: use runtimeShell
Fix shebangs and other shell uses in the NixOS tools, allowing them to work
correctly on cross-compiled systems.
2020-08-16 13:08:33 +00:00
zowoq
8fb410c0ad nixos/*: editorconfig fixes 2020-08-08 10:54:16 +10:00
Dominik Xaver Hörl
7f5000c784 nixos/iso-image: make squashfs compression easily configurable 2020-08-04 21:22:01 +02:00
Linus Heckemann
a5d20d25eb
Merge pull request #88669 from Mic92/hidpi
nixos/hidpi: Reasonable defaults for high-density displays
2020-07-22 17:43:03 +02:00
worldofpeace
747fb48c72
Merge pull request #85065 from worldofpeace/autologin-unified
nixos/displayManager: make autoLogin options independent of DM type
2020-07-10 00:04:41 -04:00
worldofpeace
490cd7889e nixos/displayManager: make autoLogin options independent of DM type
Co-authored-by: volth <volth@volth.com>
2020-07-09 21:15:35 -04:00
Eelco Dolstra
046427570e
nix: 2.3.6 -> 2.3.7 2020-07-08 16:58:54 +02:00
Matthew Bauer
c34507d795
Merge pull request #90431 from euank/nixos-install-warn
nixos-install: error out if $mountPoint has bad permissions
2020-07-05 18:55:43 -04:00
Florian Klink
d227d81c9a
Merge pull request #91195 from flokli/extlinux-conf-builder-dtbname
extlinux-conf-builder: expose and use base builder command, allow a custom FDT to be specified
2020-06-23 18:07:31 +02:00
Jörg Thalheim
7aaffa71dc
Merge pull request #91216 from Mic92/nixos-config-generate
nixos-generate-config: refer to nixos-hardware
2020-06-22 23:52:48 +01:00
Jörg Thalheim
e943489f24
nixos-generate-config: refer to nixos-hardware 2020-06-22 23:51:08 +01:00
Florian Klink
afa627730e nixos/sd-image-*: use boot.loader.generic-extlinux-compatible.populateCmd
While getting rid of the separate extlinux-conf-builder import, this now
also honors boot.loader.timeout in the initial sd card image if
specified.
2020-06-21 13:48:17 +02:00
Samuel Dionne-Riel
f203b8b277
Merge pull request #90119 from samueldr/feature/rpi4-fixups
Fix some pitfalls from the Raspberry Pi 4 specific sd image
2020-06-20 17:02:51 -04:00
Euan Kemp
460c0d608f nixos-install: error out if $mountPoint has bad permissions
The nix store more-or-less requires o+rx on all parent directories.
This is primarily because nix runs builders in a uid/gid mapped
user-namespace, and those builders have to be able to operate on the nix
store.

This check is especially helpful because nix does not produce a helpful
error on its own (rather, creating directories and such works, it's not
until 'mount --bind' that it gets an EACCES).

Helps users who run into this opaque error, such as in #67465.
Possibly fixes that issue if bad permissions were the only cause.
2020-06-18 20:10:26 -07:00
Pavol Rusnak
490fc040be
images: remove original files when using zstd for compression 2020-06-14 00:19:11 +02:00
Samuel Dionne-Riel
476c8e0754 sd-image-raspberrypi4: mount boot partition
This should have been done initially, as otherwise it gets awfully
awkward to boot into new generations by default.

This system-specific image wasn't expected to be long-lived, thus why it
didn't end up being polished much.

Reality shows us we may be stuck with it for a bit longer, so let's make
it easier to use for new users.
2020-06-11 14:41:18 -04:00
Samuel Dionne-Riel
34caab71bb sd-image: Make firmware partition name configurable
This will be helpful in the now too-long-lived image for the Raspberry
Pi 4. We'll be able to properly configure the partition to be useful.
2020-06-11 14:41:18 -04:00
Marek Mahut
7b9d7cc05d
Merge pull request #85947 from prusnak/images-zstd
Use zstd for ISO and SD images
2020-06-07 19:09:43 +02:00
Eelco Dolstra
aef2bc1330
nix: 2.3.6 -> 2.3.6 2020-06-03 14:57:39 +02:00
Graham Christensen
4512cd1385
Merge pull request #60174 from exarkun/patch-2
Fix the rootPartitionUUID description
2020-06-02 08:54:51 -04:00
Eelco Dolstra
e8896deced
nix: 2.3.4 -> 2.3.5 2020-05-27 16:48:28 +02:00
Jörg Thalheim
435340ed58
nixos-generate-config: enable hidpi module for displays 2020-05-24 16:32:03 +01:00
Alexey Shmalko
afbab5a3f3
Merge pull request #85996 from misuzu/nixos-install-low-memory
nixos/nixos-installer: use temporary directory on target filesystem
2020-05-08 18:40:24 +03:00
Eelco Dolstra
ecdb5c4320
nixos-install: 'nix build' -> nix-build
'nix build' is an experimental command so we shouldn't use it
yet. (nixos-rebuild also uses 'nix', but only when using flakes, which
are themselves an experimental feature.)
2020-05-07 13:12:29 +02:00
Jörg Thalheim
b0196cacec
Merge pull request #84476 from jakobrs/installation-cd-base-terminus 2020-04-29 17:20:49 +01:00
misuzu
5700232c3f nixos/nixos-installer: use temporary directory on target filesystem
nix build should store it's temporary files on target filesystem.
This should fix 'No space left on device' on systems
with low amount of RAM when there is a need to build something
like Linux kernel
2020-04-25 14:37:36 +03:00
Pavol Rusnak
f20fd89fc0
iso-image: use zstd for compression 2020-04-24 18:34:11 +02:00
Pavol Rusnak
c09ffc7a55
sd-image: use zstd for compression 2020-04-24 18:14:07 +02:00
worldofpeace
1f12a07179 installation-cd-graphical-gnome: don't run xorg default
If for some reason the Wayland session fails to start
it will just start the Xorg session.
2020-04-21 15:26:25 -04:00
worldofpeace
9b20a24d4d
Merge pull request #85643 from petabyteboy/feature/generate-config
nixos/tools: adapt for renamed console options
2020-04-21 12:50:55 -04:00
Milan Pässler
d19089e1e7 nixos/tools: adapt for renamed console options 2020-04-21 02:07:53 +02:00
Matthew Bauer
c45295d47e nixos/nixos-generate-config.pl: use modulesPath instead of <nixpkgs>
For imports, it is better to use ‘modulesPath’ than rely on <nixpkgs>
being correctly set. Some users may not have <nixpkgs> set correctly.
In addition, when ‘pure-eval=true’, <nixpkgs> is unset.
2020-04-20 09:57:17 -05:00
jakobrs
34f242c13d nixos/installer: Add terminus_font to installation_iso_base 2020-04-15 14:21:42 +02:00
Maximilian Bosch
ec6bac99cc
nixos/build-vms: propagate file location
When trying to build a VM using `nixos-build-vms` with a configuration
that doesn't evaluate, an error "at `<unknown-file>`" is usually shown.

This happens since the `build-vms.nix` creates a VM-network of
NixOS-configurations that are attr-sets or functions and don't contain
any file information. This patch manually adds the `_file`-attribute to
tell the module-system which file contained broken configuration:

```
$ cat vm.nix
{ vm.invalid-option = 1; }

$ nixos-build-vms vm.nix
error: The option `invalid-option' defined in `/home/ma27/Projects/nixpkgs/vm.nix@node-vm' does not exist.
(use '--show-trace' to show detailed location information)
```
2020-04-13 17:50:13 +02:00
Eelco Dolstra
aa084e2a24
nix: Fix fallback paths 2020-04-10 21:13:15 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Eelco Dolstra
cea352d276
nix: 2.3.3 -> 2.3.4 2020-04-10 17:23:28 +02:00
worldofpeace
df8c30fa25 iso-image: make $ARCH shorter
we use stdenv.hostPlatform.uname.processor, which I believe is just like
`uname -p`.

Example values:
```
(import <nixpkgs> { system = "x86_64-linux"; }).stdenv.hostPlatform.uname.processor
"x86_64"

(import <nixpkgs> { system = "aarch64-linux"; }).stdenv.hostPlatform.uname.processor
aarch64

(import <nixpkgs> { system = "armv7l-linux"; }).stdenv.hostPlatform.uname.processor
"armv7l"
```
2020-04-09 20:10:01 -04:00
worldofpeace
a775961c8f Revert "Revert "iso-image: normalize volumeID""
This reverts commit 21b50e6f68.
2020-04-09 20:06:32 -04:00
worldofpeace
21b50e6f68
Revert "iso-image: normalize volumeID" 2020-04-09 19:43:59 -04:00
worldofpeace
8583d99e42
Merge pull request #83551 from worldofpeace/iso-id
iso-image: normalize volumeID
2020-04-09 19:31:52 -04:00
Jörg Thalheim
e6a15db534
nixos: default nix.maxJobs to auto
Instead of making the configuration less portable by hard coding the number of
jobs equal to the cores we can also let nix set the same number at runtime.
2020-04-07 08:45:56 +01:00
worldofpeace
591e8d5708 iso-image: make sure volumeID is less than 32 chars 2020-03-27 21:35:12 -04:00
worldofpeace
70a8e9ace9 iso-image: normalize volumeID
The volumeID will now be in the format of:
nixos-$EDITON-$RELEASE-$ARCH

an example for the minimal image would look like:
nixos-minimal-20.09-x86-64-linux
2020-03-27 21:30:54 -04:00
Eelco Dolstra
a0a61c3e34 nixos-option: Disable on Nix >= 2.4 because it doesn't compile
This is needed when using the overlay from the Nix flake.
2020-03-20 14:52:22 +01:00
Eelco Dolstra
21a3b141c3
nix-fallback-paths.nix: Fix x86_64-linux path
https://github.com/NixOS/nix/issues/3370
2020-02-24 10:16:26 +01:00
worldofpeace
65bdc05ae8
Merge pull request #78935 from worldofpeace/update-gnome3-iso-expression
installation-cd-graphical-gnome: updates
2020-02-23 07:39:48 -05:00
worldofpeace
ad4565caa1 installation-cd-graphical-gnome: updates
Note we're not using wayland default in the graphical media because it
could cause headaches for Nvidia users. But the session is still available
if someone logs out.
2020-02-23 07:17:37 -05:00
Chuck
48810b2cfa nixos/nixos-enter: Create /tmp
/tmp is normally created by the systemd-tmpfiles-setup systemd service
at startup.

Fixes #39140
2020-02-21 17:52:47 -08:00
Eelco Dolstra
3c47f78e82
nix: 2.3.2 -> 2.3.3 2020-02-19 01:54:25 +01:00
Eelco Dolstra
a5f883e535 nixos/modules/installer/cd-dvd/channel.nix: Handle null config.system.nixos.revision 2020-02-15 20:16:14 +01:00
Maximilian Bosch
c391343fcd
nixos/nixos-build-vms: switch to python test-driver
In 0945178b3c we decided that Perl-based
VM tests should be deprecated and will be removed between 20.03 and
20.09. So let's switch `nixos-build-vms(8)` to python as well (which is
entirely interactive, so other scripts won't break).

In my experience, the test-driver isn't used most of the time, so this
patch is mainly supposed to get rid of the (probably misleading)
deprecation warning when running `nixos-build-vms`. Apart from that, the
interface for python's test-driver is way nicer.
2020-02-15 19:35:17 +01:00
snicket2100
50a597cd7a
installation-cd-graphical-base.nix: adding git (#79098) 2020-02-14 18:52:18 +02:00
Graham Christensen
2d42fc240c
nixos-enter: redirect to fd2 instead of a file named /dev/stderr
In some cases, /dev/stderr may not point to a sensible location. For
example, running nixos-enter inside a systemd unit where the unit's
StandardOutput and StandardError are set to be sockets. In these
cases, this line would fail.

Piping to fd2 directly works just as well, even under strange and
twisted executions.

Co-authored-by: Michael Bishop <michael.bishop@iohk.io>
2020-02-12 21:18:27 -05:00
Eelco Dolstra
fb05afd78d Doh 2020-02-10 16:32:59 +01:00
Eelco Dolstra
8f86624ac9 nixos-rebuild: Remove TODOs 2020-02-10 15:45:27 +01:00
Eelco Dolstra
c05cc615f2 nixos.revision: Use null instead of "master"
"master" is not a valid SHA-1 commit hash, and it's not even
necessarily the branch used. 'nixos-version --revision' now returns an
error if the commit hash is not known.
2020-02-10 15:45:15 +01:00
Eelco Dolstra
b98ea45608 nixos-version --json: Use builtins.toJSON 2020-02-10 15:45:10 +01:00
Eelco Dolstra
f9392f04ae nixos-rebuild: Remove --keep-going flag 2020-02-10 15:45:06 +01:00
Eelco Dolstra
4089dbf090 nixos-rebuild: Make 'edit' work with with flakes 2020-02-10 15:45:03 +01:00
Eelco Dolstra
c08930874a nixos-rebuild: Propagate various flake lock file flags
And also --refresh and --no-net.
2020-02-05 23:15:18 +01:00
Eelco Dolstra
2a0cf385d2 nixos-rebuild: Avoid subshell reading hostname
Co-Authored-By: Jörg Thalheim <Mic92@users.noreply.github.com>
2020-02-05 23:15:18 +01:00
Eelco Dolstra
2452042c47 nixos-rebuild: Support -L flag 2020-02-05 23:15:18 +01:00
Eelco Dolstra
98e322b929 nixos-rebuild: uri -> url 2020-02-05 23:15:18 +01:00
Eelco Dolstra
fb051f0dec nixos-{rebuild,container}: Use flakeref#attrpath syntax
This makes them consistent with the 'nix' command line.
2020-02-05 23:15:18 +01:00
Eelco Dolstra
cfd468adbb nixos-rebuild: Use /etc/nixos/flake.nix if it exists 2020-02-05 23:15:18 +01:00
Eelco Dolstra
7e9b745174 nixos-version: Add --json flag and show system.configurationRevision 2020-02-05 23:15:18 +01:00
Eelco Dolstra
22cc7ab78c nixos-rebuild: Add --flake option 2020-02-05 23:15:18 +01:00
Frederik Rietdijk
419bc0a4cd Revert "Revert "Merge master into staging-next""
In 87a19e9048 I merged staging-next into master using the GitHub gui as intended.
In ac241fb7a5 I merged master into staging-next for the next staging cycle, however, I accidentally pushed it to master.
Thinking this may cause trouble, I reverted it in 0be87c7979. This was however wrong, as it "removed" master.

This reverts commit 0be87c7979.
2020-02-05 19:41:25 +01:00