Commit graph

1280 commits

Author SHA1 Message Date
rnhmjoj 65325292da
nixos/stage-1: install networkd link files
Renaming an interface must be done in stage-1: otherwise udev will
report the interface as ready and network daemons (networkd, dhcpcd,
etc.) will bring it up. Once up the interface can't be changed and the
renaming will fail.

Note: link files are read directly by udev, so they can be used even
without networkd enabled.
2021-02-18 22:07:00 +01:00
rnhmjoj 15d6eacb15
nixos/{networkd,dhcpcd}: remove udev-settle hack
systemd-udev-settle is a terrible hack[1] and should never[2] ever[3]
used, seriously it's very bad. It was used as a stop-gap solution for
issue #39069, but thanks to PR #79532 it can be removed now.

[1]: https://github.com/systemd/systemd/issues/7293#issuecomment-592941764
[2]: https://github.com/NixOS/nixpkgs/issues/73095
[3]: https://github.com/NixOS/nixpkgs/issues/107341
2021-02-18 22:07:00 +01:00
Jan Beinke 97718a3584
nixos/systemd-lib: allow mkIf in unitOption
`unitOption` is only used inside of `attrsOf` wich is perfectly capable of
handling the attrsets from `mkIf`, though the checkUnitConfig test
forbids it. This commit weakens that restriction to allow the usage of
`mkIf` inside of `systemd.services.<name>.serviceConfig.<something>`
etc.
2021-02-11 22:18:21 +01:00
Michele Guerini Rocco 237d5fa67a
Merge pull request #111452 from urbas/linuxPackages_rpi3-missing-ahci-module
system/boot: add includeDefaultModules option
2021-02-07 12:33:51 +01:00
Matej Urbas 2c769d7a6a system/boot: add includeDefaultModules option 2021-02-07 11:14:36 +00:00
Ben Wolsieffer f413b2bc51 Revert "nixos/kernel.nix: ensure same kernel is used"
This reverts commit 78f915a002.
2021-02-03 20:31:22 -05:00
Dmitry Kalinkin 8468a9878c
Merge pull request #87856 from eadwu/kernel/same-kernel
nixos/kernel.nix: ensure same kernel is used
2021-01-30 22:13:02 -05:00
Matthew Bauer 6307346fd9
Merge pull request #98858 from sorki/cross/rpifw
raspberrypi-builder: allow passing firmware package as argument
2021-01-29 10:21:32 -06:00
Anderson Torres 79256619ce
Merge pull request #108294 from GovanifY/silent-boot
boot.initrd: add verbose option
2021-01-29 11:56:20 -03:00
John Ericson e34a53c4ea
Merge pull request #110803 from Ericson2314/fix-nixos-misc-linux-config
nixos treewide: Fix references to linux-kernel.target
2021-01-25 13:39:20 -05:00
John Ericson 63b02e55db nixos treewide: Fix references to linux-kernel.target
Thanks @ajs124 in
https://github.com/NixOS/nixpkgs/pull/110544#discussion_r563828722 for
catching this. According to:

    git grep 'inherit.*Platform.*platform'
    git grep ' linux-kernel'

We now don't have any remaining problems of this sort, thankfully.
2021-01-25 13:06:12 -05:00
Matthew Bauer e8338c9c1d
Merge pull request #110739 from matthewbauer/fix-binfmt-nix-sandbox
nixos/binfmt: add bash to sandboxPaths
2021-01-25 11:53:27 -06:00
Matthew Bauer 35bd8f1153 nixos/binfmt: add bash to sandboxPaths
bash is needed to run the new binfmt shell script.

Fixes #110540
2021-01-24 22:47:59 -06:00
volth bc0d605cf1 treewide: fix double quoted strings in meta.description
Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
2021-01-24 19:56:59 +07:00
Gauvain 'GovanifY' Roussel-Tarbouriech bc1b5fdfe0
boot.initrd: add verbose option 2021-01-24 07:16:21 +01:00
John Ericson 12881a7aa7
Merge pull request #110544 from Ericson2314/no-platform
top-level, lib: Remove platform attribute of platforms
2021-01-23 16:32:36 -05:00
Jörg Thalheim 17da58acca
Merge pull request #108242 from GovanifY/grub-additional
boot.loader.grub: add extraInstallCommands option
2021-01-23 16:18:22 +00: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 d95aebbe0e
Merge pull request #107214 from Ericson2314/linux-config-cleanup
lib: Clean up how linux and gcc config is specified
2021-01-22 15:15:58 -05:00
Robert Hensing bbaff89ceb
Merge pull request #109976 from hercules-ci/systemd-allow-preStart-with-ExecStartPre
nixos/systemd: allow preStart with other ExecStartPre cmdlines
2021-01-22 10:18:11 +01: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
Matthew Bauer da9fc7b068
Merge pull request #108072 from matthewbauer/fix-binfmt-activation
nixos/binfmt.nix: fix running commands in binfmt
2021-01-20 16:31:53 -06:00
Scriptkiddi 1572940688
networking, chrony, ntpd, timesyncd: add timeServers option type 2021-01-20 10:54:24 +01:00
Robert Hensing 3936d85ec3 nixos/systemd: allow preStart with other ExecStartPre cmdlines
Declaring them as lists enables the concatenation, supporting
lib.mkBefore, lib.mkOrder, etc.

This is useful when you need to extend a service with a pre-start
script that needs to run as root.
2021-01-19 16:29:29 +01:00
github-actions[bot] 9f69dadafd
Merge master into staging-next 2021-01-15 01:16:33 +00:00
Andreas Rammhold 3be09b94fb
Merge pull request #108860 from endocrimes/dani/fix-tmp
modules/boot: Specify the type for tmpfs mounts
2021-01-15 00:31:14 +01:00
Vladimír Čunát 9e2880e5fa
nixos ISO image: revert another part of 8ca33835ba 2021-01-13 15:25:19 +01:00
Vladimír Čunát 8ca33835ba
nixos: fixup build of aarch64 minimal ISO (fixes #109252)
Perhaps it's not pretty nor precise; feel free to improve.
2021-01-13 14:05:45 +01:00
Edmund Wu 78f915a002
nixos/kernel.nix: ensure same kernel is used
Originally, changes to the kernel don't propagate to the other
derivation within the same package set. This commit allows for the
changes in the kernel to be propagated.

A distinct example is setting `boot.kernel.randstructSeed` to a non-zero
length string which would result in building 2 kernels, one with the
correct seed and the other with the zero length seed. Then, when using
an out-of-tree kernel driver, it would be built with the zero length
seed which differs from the non-zero length seed used to boot,
contradicting the purpose of the `boot.kernel.randstructSeed`.
2021-01-11 12:57:34 -05:00
Jan Tojnar 2b9372b2ca
Merge branch 'master' into staging-next 2021-01-11 13:36:42 +01:00
Eelco Dolstra 187af93c19
Merge pull request #78430 from puckipedia/fix-initrd-silent
nixos/stage-1: Do not allow missing kernel modules in initrd
2021-01-11 13:18:45 +01:00
Jan Tojnar 88c998fb21
Merge branch 'staging-next' into staging 2021-01-10 23:24:57 +01:00
Jan Tojnar dd72357155
Merge branch 'master' into staging-next 2021-01-10 23:24:33 +01:00
Dominik Xaver Hörl 25bef2d8f9 treewide: simplify pkgs.stdenv.lib -> pkgs.lib
The library does not depend on stdenv, that `stdenv` exposes `lib` is
an artifact of the ancient origins of nixpkgs.
2021-01-10 20:12:06 +01:00
Frederik Rietdijk b209617ff0 plasma5Packages: alias to the libsForQt5 used to build the plasma5 desktop
For in NixOS it is beneficial if both plasma5 and pam use the same Qt5
version. Because the plasma5 desktop may use a different version as the
default Qt5 version, we introduce plasma5Packages.
2021-01-10 15:59:45 +01:00
Danielle Lancashire ca7b35d2d9
modules/boot: Specify the type for tmpfs mounts
https://github.com/NixOS/nixpkgs/pull/107497 broke booting on many systems that
use tmpOnTmpfs due to the lack of specifying the mount type.

This commit explicitly adds the mount type, which should fix booting
such systems.

The original change may want to be revisited however too.
2021-01-09 15:32:17 +01:00
github-actions[bot] e251591528
Merge master into staging-next 2021-01-09 01:00:25 +00:00
Florian Klink 964c419bc0
Merge pull request #107497 from helsinki-systems/fix/tmp-mount
nixos/tmp: Make /tmp on ramdisk usable again
2021-01-08 23:54:46 +01:00
Gauvain 'GovanifY' Roussel-Tarbouriech 771ba47d56
boot.loader.grub: add extraInstallCommands option 2021-01-03 09:31:51 +01:00
Matthew Bauer 08135a3caa nixos/binfmt.nix: fix running commands in binfmt
To allow arguments in binfmt, we need to put the command in a shell
script. This uses exec to run the binfmt interpreter.

Fixes #90683
2020-12-31 13:28:01 -06:00
Blaž Hrastnik a6b5693a71 nixos/stage-1: set zstd as the default compressor when supported
Co-authored-by: Atemu <atemu.main@gmail.com>
2020-12-28 14:25:17 +01:00
Janne Heß 56d7e7492c
nixos/tmp: Make /tmp on ramdisk usable again
@poettering decided we only need a limited number of inodes in our /tmp,
so why not limit that for every systemd user? That makes medium-sized nix
builds impossible so this commit restores the old behaviour which is the
kernel default of half the number of physical RAM pages which does not
seem too unreasonable to me.
2020-12-26 13:13:41 +01:00
Florian Klink c674a51382 nixos/systemd: provide libidn2 for systemd-resolved
systemd started using dlopen() for some of their "optional"
dependencies.

Apparently, `libidn2` isn't so optional, and systemd-resolved doesn't
work without libidn2 present, breaking DNS resolution.

Fixes https://github.com/NixOS/nixpkgs/issues/107537

Upstream bug: https://github.com/systemd/systemd/issues/18078
2020-12-25 13:45:25 +01:00
Linus Heckemann 834cc5d5fa nixos/initrd: docbookise "compressor" description 2020-12-17 23:01:08 +01:00
Dominik Xaver Hörl d4ef25db5d nixos/initrd: add compressorArgs, make compressor option public 2020-12-17 11:38:10 +01:00
Linus Heckemann c14f14eeaf
Merge pull request #97505 from mayflower/grub-efi-mirroredboot
nixos/grub: allow multiple "nodev" devices for mirroredBoots
2020-12-04 18:37:50 +01:00
Frederik Rietdijk 0d8491cb2b Merge master into staging-next 2020-11-29 13:51:10 +01:00
Sarah Brofeldt a7a5f7904c
Merge pull request #99173 from johanot/fix-initrd-ssh-commands-test
nixos/initrd-ssh: set more defensive pemissions on sshd test key
2020-11-29 11:27:03 +01:00
Frederik Rietdijk b2a3891e12 Merge master into staging-next 2020-11-27 15:09:19 +01:00