Commit Graph

847 Commits

Author SHA1 Message Date
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