Commit graph

1849 commits

Author SHA1 Message Date
Maciej Krüger 801d832872
Merge pull request #125451 from zhaofengli/qemu-riscv64-sd-image 2022-01-07 22:14:05 +01:00
Zhaofeng Li 16a907b00b generic-extlinux-compatible: Allow disabling generation of device tree directives 2022-01-06 17:23:10 -08:00
github-actions[bot] 1342506d40
Merge staging-next into staging 2022-01-07 00:04:19 +00:00
0x4A6F 29acc14f0d
Merge pull request #143060 from zhaofengli/binfmt-argv0
nixos/binfmt: Add QEMU wrapper to preserve argv[0]
2022-01-06 19:21:47 +01:00
github-actions[bot] a738715d80
Merge staging-next into staging 2022-01-05 00:02:28 +00:00
pennae fc614c37c6 nixos/documentation: split options doc build
most modules can be evaluated for their documentation in a very
restricted environment that doesn't include all of nixpkgs. this
evaluation can then be cached and reused for subsequent builds, merging
only documentation that has changed into the cached set. since nixos
ships with a large number of modules of which only a few are used in any
given config this can save evaluation a huge percentage of nixos
options available in any given config.

in tests of this caching, despite having to copy most of nixos/, saves
about 80% of the time needed to build the system manual, or about two
second on the machine used for testing. build time for a full system
config shrank from 9.4s to 7.4s, while turning documentation off
entirely shortened the build to 7.1s.
2022-01-02 19:46:13 +01:00
Naïm Favier f2065d81ad stdenv/generic: introduce shellDryRun
Add `shellDryRun` to the generic stdenv and substitute it for uses of
`${stdenv.shell} -n`. The point of this layer of abstraction is to add
the flag `-O extglob`, which resolves #126344 in a more direct way.
2021-12-27 20:30:01 -05:00
Artturi 3239e947d1
Merge pull request #151156 from Artturin/fsckonbat 2021-12-27 04:18:40 +02:00
Michael Hoang 13903fef2d nixos/systemd-boot: Add option to add netboot.xyz 2021-12-23 11:44:29 +11:00
Michael Hoang f6b61981b1 nixos/systemd-boot: Support extra EFI entries 2021-12-23 11:44:29 +11:00
Florian Klink 60e571fa40
Merge pull request #150922 from ncfavier/systemd-tzdir
nixos/systemd: set TZDIR for PID 1
2021-12-22 11:52:27 +01:00
Artturin c44f95a855 nixos/stage1: run fsck on battery too
We are in 2021 almost 2022 not in 2004 when this may have been an issue!

https://alioth-lists.debian.net/pipermail/pkg-sysvinit-devel/2009-May/003196.html
https://www.nico.schottelius.org/blog/debian-ubuntu-fsck-skip-on-battery-bug/
d29daf3952
https://bugs.launchpad.net/ubuntu/+source/laptop-mode/+bug/11194
2021-12-18 06:06:10 +02:00
Graham Christensen 06edb74413
Merge pull request #148785 from pennae/more-option-doc-staticizing
treewide: more defaultText for options
2021-12-17 11:14:08 -05:00
Robert Hensing 4014fb6a64 nixos: Make system.build a lazyAttrsOf unspecified
Legacy types.attrs has really bad merging behavior and does not
support priorities.

f build
2021-12-17 14:42:44 +01:00
Naïm Favier 901d4f13a3
nixos/systemd: set TZDIR for PID 1
Fixes #105049
2021-12-16 04:09:07 +01:00
Bernardo Meurer f40283cf62
Merge pull request #149837 from helsinki-systems/feat/redo-activation-script-restarting
nixos/switch-to-configuration: Add a massive test and do a slight refactor
2021-12-13 11:37:20 -08:00
Janne Heß 6807628791
nixos/switch-to-configuraton: Add details about sockets 2021-12-09 13:51:18 +01:00
Andreas Rammhold 6e69e537ff
Merge pull request #145183 from veehaitch/networkd-DHCPServerStaticLease
nixos/networkd: add `dhcpServerStaticLeaseConfig` option
2021-12-09 12:57:46 +01:00
Janne Heß 2024306048
nixos/switch-to-configuration: Restart non-services 2021-12-09 12:31:48 +01:00
Janne Heß 393c721849
nixos/switch-to-configuration: Move handleModifiedUnit into a sub 2021-12-09 11:31:59 +01:00
pennae 2d564521c0 treewide: add literalDocBook text to options with complex defaults
some options have default that are best described in prose, such as
defaults that depend on the system stateVersion, defaults that are
derivations specific to the surrounding context, or those where the
expression is much longer and harder to understand than a simple text
snippet.
2021-12-09 01:38:24 +01:00
Florian Klink fec4daf38d
Merge pull request #149342 from helsinki-systems/feat/restart-systemd-on-systemconf-change
nixos/switch-to-configuration: Restart systemd when system.conf is changed
2021-12-08 23:23:04 +01:00
ajs124 eee45bb295
Merge pull request #146815 from ElvishJerricco/systemd-utils-expressions
Move systemd-lib.nix and systemd-unit-options.nix into utils
2021-12-08 15:07:28 +00:00
Janne Heß e36ceb65e6
Merge pull request #129449 from ddz/copy-initrd-secrets-after-early-mount-script
nixos/stage1: copy initrd secrets into place after special mounts
2021-12-08 15:38:02 +01:00
Janne Heß 1f41365cda
nixos/switch-to-configuration: Restart systemd when system.conf is changed 2021-12-07 14:32:19 +01:00
Bernardo Meurer ebb7f07eec
Merge pull request #148751 from NixOS/feat/slight-stc-improvements
nixos/switch-to-configuration: Add small improvements
2021-12-07 02:38:26 -08:00
Yuka ce54a4f658
nixos/networkd: add RoutingPolicyRule Type option (#146168) 2021-12-07 10:13:22 +01:00
pennae c694c35f9d nixos/*: escape pkgs reference in examples and descriptions 2021-12-06 00:38:05 +01:00
Janne Heß b30d619368
nixos/top-level: Check syntax of switch-to-configuration 2021-12-05 18:54:36 +01:00
Janne Heß 6f1e0dc34f
nixos/switch-to-configuration: Move excludes up 2021-12-05 18:54:19 +01:00
Janne Heß 5d34545954
nixos/switch-to-configuration: Ignore scopes 2021-12-05 18:47:35 +01:00
Janne Heß 1e422e7d58
nixos/switch-to-configuration: Fix dry order
This makes the order of the dry activation messages the same as the real
actions which makes more sense than another random order.
2021-12-05 18:46:50 +01:00
Janne Heß 3693e8b093
nixos/switch-to-configuration: Clean perl code
oct() is recommended by perlcritic and the rest was unused.
2021-12-05 18:45:44 +01:00
Janne Heß 50a0f33c2a
nixos/switch-to-configuration: Remove unnecessary TODOs
The first one doesn't make any sense because the directory where the
init binary resides does not contain other tools we need like
systemd-escape.

The second one doesn't make sense either because the errors are already
ignored.
2021-12-05 18:43:42 +01:00
pennae 2512455639 nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
Zhaofeng Li 9e5d0a9458 nixos/binfmt: Preserve argv[0] when using QEMU 2021-12-01 22:20:48 -08:00
Robert Hensing 8a129f8cf0
Merge pull request #144094 from hercules-ci/nixos-specialisations-use-extendModules
nixos/specialisation: Rephrase in terms of extendModules, noUserModules
2021-12-01 11:03:36 +01:00
Vincent Haupert ce81231420 nixos/networkd: add dhcpServerStaticLeaseConfig option
Add `systemd.network.networks.*.dhcpServerStaticLeaseConfig` to allow
for configuring static DHCP leases through the `[DHCPServerStaticLease]`
section. See systemd.network(5) of systemd 249 for details.

Also adds the NixOS test `systemd-networkd-dhcpserver-static-lease` to
test the assignment of static leases.
2021-11-30 09:58:33 +01:00
Sandro 61c3243dc7
Merge pull request #113887 from xaverdh/install-grub-editorconfig-fixup 2021-11-29 21:03:41 +01:00
Michael Weiss 1cfecb636b
Revert "Merge pull request #141192 from helsinki-systems/feat/improved-socket-handling2"
This reverts commit 57961d2b83, reversing
changes made to b04f913afc.
(I.e. this reverts PR #141192.)

While well-intended, this change does unfortunately introduce very
serious regressions that are especially disruptive/noticeable on desktop
systems (e.g. users of Sway will loose their graphical session when
running "nixos-rebuild switch").

Therefore, this change has to be reverted ASAP instead of trying to fix
it in "production".
Note: An updated version should be extensively discussed, reviewed, and
tested before re-landing this change as an earlier version also had to
be reverted for the exact same issues [0].

Fix: #146727

[0]: https://github.com/NixOS/nixpkgs/pull/73871#issuecomment-559783752
2021-11-27 17:22:22 +01:00
Dominik Xaver Hörl 0360e03520 nixos/install-grub: fix whitespace
This time hopefully without changing the generated boot script.
2021-11-27 10:18:21 +01:00
Dominik Xaver Hörl 19447850a2 Revert "nixos/install-grub: normalize whitespace"
This morally reverts commit 0e8d7f9b3d.
It made the generated boot script hard to read.
2021-11-27 10:18:04 +01:00
github-actions[bot] 28641f51dc
Merge master into staging-next 2021-11-22 18:01:08 +00:00
Artturin 7f24a5ff35 nixos/systemd: readd dbus-org.freedesktop.login1.service to upstreamSystemUnits
it was removed in
eb862c48dd (diff-5ea4693beb4bdd8f7efcdd3204ceea67c86f59b3d1c28cde063ddf03e1d20fbfL66)

without this change i get
Failed to list users: Unit dbus-org.freedesktop.login1.service not found.
when i update and rebuild
2021-11-22 05:59:05 +02:00
github-actions[bot] 18ad263272
Merge master into staging-next 2021-11-21 18:01:07 +00:00
Ryan Burns 2175b157ac treewide: refactor isi686 && isx86_64 -> isx86 2021-11-20 17:50:41 -08:00
Will Fancher 851495a752 Move systemd-lib.nix and systemd-unit-options.nix into utils 2021-11-20 17:52:29 -05:00
github-actions[bot] 90829d83e5
Merge master into staging-next 2021-11-17 00:01:49 +00:00
n0emis eeac1c543d
nixos/networkd: add BatmanAdvanced options (#145963)
Since systemd v248 networkd supports BatmanAdvanced.
This adds the according config options to the networkd-module
2021-11-16 23:41:17 +01:00
github-actions[bot] cfaff97318
Merge staging-next into staging 2021-11-15 18:01:43 +00:00
Taeer Bar-Yam 0bef0c38f7 lib.modules: add mkDerivedConfig
mkDerivedConfig : Option a -> (a -> Definition b) -> Definition b

Create config definitions with the same priority as the definition of another option.
This should be used for option definitions where one option sets the value of another as a convenience.
For instance a config file could be set with a `text` or `source` option, where text translates to a `source`
value using `mkDerivedConfig options.text (pkgs.writeText "filename.conf")`.

It takes care of setting the right priority using `mkOverride`.
2021-11-15 07:03:41 -05:00
Taeer Bar-Yam 0e590c91d2 etc module: make .text and .source the same priority
Before this change, one could set environment.etc.*.text and .source.
.source would always take precedence, regardless of the priorities set.
This change means that if, for instance, .text is set with mkForce but
.source is set normally, the .text content will be the one to take
effect. If they are set with the same priority they will conflict.
2021-11-14 18:47:09 -05:00
github-actions[bot] d5964b8c81
Merge staging-next into staging 2021-11-10 00:02:09 +00:00
Christian Kögler 33ffba995d
NixOS: Document impurity issues with boot.binfmt.emulatedSystems (#142778)
* NixOS: Document impurity issues with boot.binfmt.emulatedSystems

* Update nixos/modules/system/boot/binfmt.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

* Update nixos/modules/system/boot/binfmt.nix

Co-authored-by: Moritz Hedtke <13287984+mohe2015@users.noreply.github.com>

* Update nixos/modules/system/boot/binfmt.nix

Co-authored-by: Moritz Hedtke <13287984+mohe2015@users.noreply.github.com>

* Update nixos/modules/system/boot/binfmt.nix

Co-authored-by: markuskowa <markus.kowalewski@gmail.com>

* Apply suggestions from code review

Co-authored-by: markuskowa <markus.kowalewski@gmail.com>

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Co-authored-by: Moritz Hedtke <13287984+mohe2015@users.noreply.github.com>
Co-authored-by: markuskowa <markus.kowalewski@gmail.com>
2021-11-09 21:49:45 +01:00
Florian Klink 6ae271565d
Merge pull request #140046 from jrobsonchase/systemd-boot/fix-regexp
nixos/systemd-boot: Fix installed version regexp
2021-11-06 12:24:32 +01:00
Josh Robson Chase 3efc2de6d1
nixos/systemd-boot: Use the correct version string from the bootctl --version output 2021-11-05 12:11:22 -04:00
Josh Robson Chase 4ddc78818e
nixos/systemd-boot: Re-add the verison check, but as equivalence-only 2021-11-05 12:11:21 -04:00
Josh Robson Chase 71ed9d096e
nixos/systemd-boot: Remove the installed version check altogether
bootctl does it as a part of its update process anyway, so we're just
duplicating code.
2021-11-05 12:11:20 -04:00
Josh Robson Chase 1d5ffa8cac
nixos/systemd-boot: Fix installed version regexp
The regexp was only matching numbers and not the '.', so everyone using
systemd-boot would always see `could not find any previously installed
systemd-boot` on a `nixos-rebuild`.
2021-11-05 12:11:19 -04:00
Maciej Krüger f37f1b2d01
Merge pull request #130388 from oxalica/fix/etc-nixos-tag-in-activation 2021-11-04 15:26:17 +01:00
Maciej Krüger 7667f641c9
systemd: disable systemd-udev-trigger.service in containers 2021-11-03 07:49:50 +01:00
Michael Fellinger cb3a0f55e8 stage2: use atomic bind mounts 2021-11-01 20:12:59 -07:00
Robert Hensing b5681a7a40 nixos/specialisation: Rephrase in terms of extendModules, noUserModules
By using the new extendModules function to produce the specialisations,
we avoid reimplementing the eval-config.nix logic in reverse and fix
cross compilation support for specialisations in the process.
2021-11-01 10:59:47 +01:00
Luke Granger-Brown 13fad0f81b nixos/systemd-boot: create boot entries for specialisations
Some specialisations (such as those which affect various boot-time
attributes) cannot be switched to at runtime. This allows picking the
specialisation at boot time.
2021-10-31 11:36:15 +00:00
Florian Klink 81715a5da0
Merge pull request #142570 from flokli/add-missing-cryptsetup-targets
nixos/systemd: add remote-cryptsetup.target
2021-10-25 12:51:27 +02:00
Artturi dfad31d753
Merge pull request #142273 from ju1m/display-managers 2021-10-23 03:58:21 +03:00
Florian Klink 0084c41abf nixos/systemd: add remote-cryptsetup.target
/etc/crypttab can contain the _netdev option, which adds crypto devices
to the remote-cryptsetup.target.

remote-cryptsetup.target has a dependency on cryptsetup-pre.target. So
let's add both of them.

Currently, one needs to manually ssh in and invoke `systemctl start
systemd-cryptsetup@<name>.service` to unlock volumes.

After this change, systemd will properly add it to the target, and
assuming remote-cryptsetup.target is pulled in somewhere, you can simply
pass the passphrase by invoking `systemd-tty-ask-password-agent` after
ssh-ing in, without having to manually start these services.

Whether remote-cryptsetup.target should be added to multi-user.target
(as it is on other distros) is part of another discussion - right now
the following snippet will do:

```
systemd.targets.multi-user.wants = [ "remote-cryptsetup.target" ];
```
2021-10-22 15:47:21 +02:00
Julien Moutinho 2ef7fec214 nixos/systemd-lib: fix cross-compiling 2021-10-21 03:55:36 +02:00
Hugo Lageneste e09fb63ffc nixos/luksroot: sync the crypt-storage
Add a sync command just after writing to the /crypt-storage file in order to reduce
the possibilities of corruption errors.
2021-10-20 03:46:19 +03:00
Janne Heß 4cdbb2d891
nixos/switch-to-configuration: Fix ordering and indentation
This makes the order of operations the same in dry-activate and a "true"
activate. Also fixes the indentation I messed up and drop a useless
unlink() call (we are already unlinking that file earlier).
2021-10-17 14:35:49 +02:00
Janne Heß ad09f7be14
nixos/switch-to-configuration: Handle stopped sockets
The previous logic failed to detect that units were socket-activated
when the socket was stopped before switch-to-configuration was run. This
commit fixes that and also starts the socket in question.
2021-10-17 14:35:48 +02:00
Janne Heß 558158b4f5
nixos/switch-to-configuration: Hide socket warnings 2021-10-17 14:35:48 +02:00
Janne Heß 047aa1a0e9
nixos/switch-to-configuration: Use early return 2021-10-17 14:35:47 +02:00
Janne Heß 4f870c7d70
nixos/switch-to-configuration: Restart timers 2021-10-17 14:35:47 +02:00
Janne Heß adc033cd59
nixos/switch-to-configuration: Ignore path units 2021-10-17 14:35:46 +02:00
Janne Heß de128feacc
nixos/switch-to-configuration: Ignore slice units 2021-10-17 14:35:46 +02:00
Janne Heß b515bae5cf
nixos/switch-to-configuration: Remove some FIXMEs
The first FIXME is removed because it doesn't make sense to use
/proc/1/exe since that points to a directory that doesn't have all tools
the activation script needs (like systemd-escape).

The second one is removed because there is already no error handling
(compare with the restart logic where the return code is checked).
2021-10-17 14:35:45 +02:00
Janne Heß cfad5e3403
nixos/switch-to-configuration: Improve socket support
This commit changes a lot more that you'd expect but it also adds a lot
of new testing code so nothing breaks in the future. The main change is
that sockets are now restarted when they change. The main reason for
the large amount of changes is the ability of activation scripts to
restart/reload units. This also works for socket-activated units now,
and honors reloadIfChanged and restartIfChanged. The two changes don't
really work without each other so they are done in the one large commit.

The test should show what works now and ensure it will continue to do so
in the future.
2021-10-17 14:35:43 +02:00
Janne Heß 744162ffb6
nixos/switch-to-configuration: Fix perlcritic warning 2021-10-17 14:33:42 +02:00
Janne Heß c4d34cd184
nixos/top-level: Check Syntax of switch-to-configuration 2021-10-17 14:33:42 +02:00
Janne Heß f0a31f9b9f
nixos/switch-to-configuration: Ignore started scopes
They are not managed by us and it might be weird to users to see units
they didn't expect to be started.
2021-10-17 14:33:42 +02:00
Janne Heß ec619ca369
nixos/switch-to-configuration: Remove unused variable 2021-10-17 14:33:41 +02:00
pennae f29ea2d15d nixos/networking: add foo-over-udp endpoint support
allows configuration of foo-over-udp decapsulation endpoints. sadly networkd
seems to lack the features necessary to support local and peer address
configuration, so those are only supported when using scripted configuration.
2021-10-16 20:48:03 -04:00
Vladimir Serov a868222d65
nixos.system.boot.kernel: stronger constraints for kernelParam type
Checks whether all spaces are inside double quotes, thus ensuring that one
string parses as no more than one kernel param.

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
2021-10-16 01:21:10 +03:00
Graham Christensen a997f198a3
Merge pull request #139833 from flox/multipath
nixos/multipath: add module for multipath-tools package
2021-10-13 09:58:25 -04:00
Joerie de Gram 7bd84b6685 systemd-boot: add 'graceful' configuration option
On some systems bootctl cannot write the `LoaderSystemToken` EFI variable
during installation, which results in a failure to install the boot
loader. Upstream provides a flag (--graceful) to ignore such write failures -
this change exposes it as a configuration option.

As the exact semantics of this option appear to be somewhat volatile it
should be used only if systemd-boot otherwise fails to install.
2021-10-11 15:14:33 +02:00
Michael Brantley 121cfd1998 nixos/multipath: add multipath module
The multipath-tools package had existed in Nixpkgs for some time but
without a nixos module to configure/drive it. This module provides
attributes to drive the majority of multipath configuration options
and is being successfully used in stage-1 and stage-2 boot to mount
/nix from a multipath-serviced iSCSI volume.

Credit goes to @grahamc for early contributions to the module and
authoring the NixOS module test.
2021-10-08 09:47:38 -04:00
Graham Christensen 829bbc708b boot.initrd.extraFiles: allow users to add arbitrary files to the initrd 2021-10-08 09:47:01 -04:00
Andreas Rammhold 0873980dc8
Merge pull request #139754 from eyJhb/networkd-iaid
nixos/networkd: added IAID, DUIDType and DUIDRawData to DHCPv6 section
2021-10-05 10:06:05 +02:00
Naïm Favier 2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
Robert Hensing c3bf08d1b0
Merge pull request #139431 from erikarvstedt/etc-simplify-source
nixos/etc: simplify source path handling
2021-10-03 00:50:39 +02:00
eyjhb 4b8bd41060
nixos/networkd: added IAID, DUIDType and DUIDRawData to DHCPv6 section 2021-09-28 15:33:06 +02:00
Jörg Thalheim 59cb7a87d7
Merge pull request #137124 from helsinki-systems/feat/activation-script-restart
nixos/switch-to-configuration: Allow activation scripts to restart units
2021-09-26 15:46:38 +01:00
Leo Maroni e95a50a64b
nixos/networkd: add ActivationPolicy option 2021-09-25 16:03:42 +02:00
Erik Arvstedt 654f41435b
nixos/etc: simplify source path handling
This change is strictly functionally equivalent because we're just
lifting the transformation of `source` out of `mapAttrs` to the single point of
use (in escapeShellArgs).

This is also much faster because we can skip a map over all `etc` items.
2021-09-25 14:44:38 +02:00
Artturi e7b6d118f2
Merge pull request #113241 from chkno/user-activation-scripts
Run userActivationScripts at login
2021-09-18 05:25:06 +03:00
Artturi 74b3e9ff87
Merge pull request #136471 from Artturin/tmpontmpfssize 2021-09-16 02:25:02 +03:00
github-actions[bot] 728f30ca03
Merge master into staging-next 2021-09-15 00:01:33 +00:00
github-actions[bot] 91c89490cc
Merge master into staging-next 2021-09-14 18:01:05 +00:00
ajs124 9c566248df
Merge pull request #137508 from helsinki-systems/fix/dry-activation
nixos/activation-script: Fix dependencies for dry activation
2021-09-14 15:55:37 +02:00
Guillaume Girol 9739ba6baf nixos/systemd: create a group for systemd-coredump
Fixes:
```
activating the configuration...
warning: user ‘systemd-coredump’ has unknown group ‘systemd-coredump’
setting up /etc...
```

Oversight of #133166
2021-09-14 12:00:00 +00:00
github-actions[bot] 1db0c42d5a
Merge master into staging-next 2021-09-14 00:01:23 +00:00
Guillaume Girol 3592034595
Merge pull request #133166 from symphorien/nonogroup
Don't default to nogroup for the primary group of users.
2021-09-13 18:29:21 +00:00
Jonathan Ringer ca1731455d
Merge remote-tracking branch 'origin/master' into staging-next 2021-09-13 08:09:52 -07:00
Alyssa Ross 0f279e2e0c nixos/top-level: fix cross
When cross-compiling, we can't run the runtime shell to check syntax
if it's e.g. for a different architecture.  We have two options here.
We can disable syntax checking when cross compiling, but that risks
letting errors through.  Or, we can do what I've done here, and change
the syntax check to use stdenv's shell instead of the runtime shell.
This requires the stdenv shell and runtime shell to be broadly
compatible, but I think that's so ingrained in Nixpkgs anyway that
it's fine.  And this way we avoid conditionals that check for cross.
2021-09-13 11:13:38 +00:00
Guillaume Girol bc3bca822a nixos: define the primary group of users where needed 2021-09-12 14:59:30 +02:00
Janne Heß 4db13430fb
nixos/activation-script: Fix dependencies for dry activation 2021-09-12 11:34:13 +02:00
github-actions[bot] fc5d1c0828
Merge master into staging-next 2021-09-09 12:01:24 +00:00
Janne Heß e8388f8574
nixos/switch-to-configuration: Allow activation scripts to restart units
The primary use case is tools like sops-nix and agenix to restart units
when secrets change. There's probably other reasons to restart units as
well and a nice thing to have in general.
2021-09-09 13:11:52 +02:00
Janne Heß 2bcd3dad86
nixos/top-level: Check activation script syntax 2021-09-08 20:08:44 +02:00
github-actions[bot] 31efc58eb0
Merge master into staging-next 2021-09-08 18:01:03 +00:00
Artturin f45e8d560e nixos/tmp: add tmpOnTmpfsSize 2021-09-08 19:30:52 +03:00
Lassulus 5f4004ea94
Merge pull request #136605 from helsinki-systems/feat/dry-activation-scripts
nixos: Add dry activation for users/groups
2021-09-08 18:10:09 +02:00
Alyssa Ross 071a7a4583
Merge remote-tracking branch 'nixpkgs/master' into staging-next 2021-09-03 18:23:45 +00:00
Janne Heß 3156730402
nixos/switch-to-configuration: Add dry activation scripts 2021-09-03 18:40:11 +02:00
Graham Christensen 3677d4bc22 kexec-tools: rename from kexectools to match the project name 2021-09-03 10:17:21 -04:00
github-actions[bot] 0630061ef3
Merge master into staging-next 2021-09-02 18:01:20 +00:00
Matthias Treydte 9ce8df127d nixos/etc: make sure local "source" files are imported to the store
The treatment of the "source" parameter changed
with eb7120dc79, breaking stuff.

Before that commit, the source parameter was converted to a
string by implicit coercion, which would copy the file to the
store and yield an string containing the store path. Now, by
the virtue of escapeShellArg, toString is called explicitly on
that path, which will yield an string containing the absolute
path of the file.

This commit restores the old behavior.
2021-09-02 15:50:44 +02:00
github-actions[bot] b13b005f0e
Merge master into staging-next 2021-08-26 12:01:09 +00:00
hyperfekt d5b9aefa43 stage-1: fix copytoram option for loopback.cfg boot
Uses an alternative method to find the size of the ISO when it is a file and
not a block device for creating the tmpfs its contents are copied to.
2021-08-25 01:35:31 +00:00
Jan Tojnar 7a04c2ad68 Merge branch 'staging-next' into staging
- boost 171 removed on staging-next
- re-generated node-packages.nix

; Conflicts:
;	pkgs/development/java-modules/m2install.nix
;	pkgs/development/node-packages/node-packages.nix
;	pkgs/top-level/all-packages.nix
2021-08-22 01:13:41 +02:00
Timothy DeHerrera 3cc7e2f037
Merge pull request #115927 from input-output-hk/fix-deleted-sockets-restart
nixos/switch-to-configuration: don't try restart deleted sockets
2021-08-20 08:33:42 -06:00
Timothy DeHerrera 066bcd954f
Merge pull request #117476 from jbgi/systemd-journald@
nixos/systemd: add namespaced (templated) journald sockets and service
2021-08-20 08:32:05 -06:00
Jan Tojnar e286e1cfa0 Merge branch 'staging-next' into staging
- boost 167 removed on staging-next (7915d1e03f) × boost attributes are inherited on staging (d20aa4955d)

- linux kernels were moved to linux-kernels.nix on staging-next (c62f911507) × hardened kernels are versioned on staging (a5341beb78) + removed linux_5_12 (e55554491d)

- conflict in node-packages – I regenerated it using node2nix from nixos-unstable (does not build on staging)
2021-08-17 18:52:37 +02:00
Jörg Thalheim 4df44299d6
Merge pull request #73780 from h0m1/fixnix/stage-1
stage-1: create temporary secrets directory in /tmp and not in cwd
2021-08-17 06:33:42 +01:00
Jörg Thalheim f251e39c45
Merge pull request #128134 from xaverdh/linux-package-set
move linux packages out of all-packages
2021-08-15 08:14:35 +01:00
Anderson Torres 5605b561ce
Merge pull request #109302 from SrTobi-Forks/tobias/grub-savedefault
nixos/grub: implements GRUB_SAVEDEFAULT feature
2021-08-14 10:35:16 -03: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
Guillaume Girol 71154a8a8a
Merge pull request #130519 from Mic92/journald
nixos/journald: don't set nogroup
2021-08-08 15:02:31 +00:00
Rouven Czerwinski 06667df72b
nixos/etc: use runCommandLocal (#133037)
Instead of setting preferLocalBuild & allowSubstitutes explicitly, use
runCommandLocal which sets the same options.
2021-08-07 14:56:21 -04:00
Jörg Thalheim f0672fa7fb
Merge pull request #129413 from ngkz/binfmt-order-fix
nixos/binfmt: run binfmt activation script after mounting /run
2021-08-03 12:20:17 +01:00
Florian Klink b8662b8dba
Merge pull request #131948 from flokli/systemd-coredump-user
nixos/systemd: provision a systemd-coredump user
2021-08-02 16:14:49 +02:00
Jörg Thalheim 4dba1b99ec
Merge pull request #131102 from helsinki-systems/feat/rework-etc-2
nixos/etc: Replace make-etc.sh with nix and bash
2021-07-31 03:57:59 +01:00
Janne Heß eb7120dc79
nixos/etc: Replace make-etc.sh with nix and bash
The main goal of this commit is to replace the rather fragile passing of
multiple arrays which could break in cases like #130935.
While I could have just added proper shell escaping to the variables
being passed, I opted for the more painful approach of replacing the
fragile and somewhat strange construct with the 5 bash lists. While
there are currently no more problems present with the current approach
(at least none that I know of), the new approach seems more solid and
might get around problems that could arise in the future stemming from
either the multiple-lists situation or from the absence of proper shell
quoting all over the script.
2021-07-30 21:33:13 +02:00
Florian Klink 7293489288 nixos/systemd: provision a systemd-coredump user
systemd-coredump tries to drop privileges to a systemd-coredump user if
present (and falls back to the root user if it's not available).

Create that user, and recycle uid 151 for it. We don't really care about
the gid.

Fixes https://github.com/NixOS/nixpkgs/issues/120803.
2021-07-29 15:00:24 +02:00
SrTobi eff8d3bdb1 nixos/grub: implements GRUB_SAVEDEFAULT feature
Grub will remember the configuration that was booted and
select it as default menu entry the next time (#108206).
2021-07-28 18:57:08 +02:00
Ben Siraphob b63a54f81c
Merge pull request #110742 from siraben/deprecate-fold 2021-07-27 15:13:31 +07:00
Dino A. Dai Zovi 30b97d7cca
nixos/stage1: copy initrd secrets into place after special mounts
This modifies initialRamdiskSecretAppender to stage secrets in
/.initrd-secrets/ and stage-1-init to copy them into place after mounting
special file systems. This allows secrets to be copied into ramfs mounts
like /run/keys for use after stage-1 finishes without copying them to disk
(which would not be very secure).
2021-07-18 18:27:21 +00:00
Jörg Thalheim ad59e62780 nixos/journald: don't set nogroup 2021-07-18 08:46:54 +02:00
Florian Klink c1536f5c78 nixos/systemd: fix NSS database ordering
- The order of NSS (host) modules has been brought in line with upstream
  recommendations:

  - The `myhostname` module is placed before the `resolve` (optional) and `dns`
    entries, but after `file` (to allow overriding via `/etc/hosts` /
    `networking.extraHosts`, and prevent ISPs with catchall-DNS resolvers from
    hijacking `.localhost` domains)
  - The `mymachines` module, which provides hostname resolution for local
    containers (registered with `systemd-machined`) is placed to the front, to
    make sure its mappings are preferred over other resolvers.
  - If systemd-networkd is enabled, the `resolve` module is placed before
    `files` and `myhostname`, as it provides the same logic internally, with
    caching.
  - The `mdns(_minimal)` module has been updated to the new priorities.

  If you use your own NSS host modules, make sure to update your priorities
  according to these rules:

  - NSS modules which should be queried before `resolved` DNS resolution should
    use mkBefore.
  - NSS modules which should be queried after `resolved`, `files` and
    `myhostname`, but before `dns` should use the default priority
  - NSS modules which should come after `dns` should use mkAfter.
2021-07-17 23:55:35 +02:00
oxalica cba8b52942
Check and create /etc/NIXOS during activation 2021-07-17 01:55:00 +08:00
Kreyren ca3b4ce3d2
systemd.tmpfiles.rules: Fix false info
As per https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html the current description is missleading as it fails to mention volatile files and creation with deletion
2021-07-08 15:36:30 +02:00
Kazutoshi Noguchi bf22778585 nixos/binfmt: run binfmt activation script after mounting /run
binfmt activation script creates /run/binfmt before mounting /run
when system activation.

To fix it I added dependency to specialfs to binfmt activation
script.
2021-07-06 17:18:33 +09:00
Naïm Favier c0b2241e53
nixos/top-level: pass lib to specialisations 2021-07-03 13:05:55 +02:00
Markus S. Wamser 8e48b24d76 modules/luksroot: add note about AE to allowDiscards 2021-07-01 23:37:07 +02:00
Jörg Thalheim f75e2a648c
Merge pull request #128023 from max-privatevoid/patch-1
nixos/systemd-boot: Use os.path.realpath to fully resolve symlinks
2021-07-01 07:17:50 +01:00
Max 2cf6f9e5bd
nixos/systemd-boot: Use os.path.realpath to fully resolve symlinks
os.readlink only resolves one layer of symlinks. This script explicitly relies on the real path of a file for deduplication, hence symlink resolution should recurse.
2021-06-24 17:52:03 +02:00
Dominik Xaver Hörl 436f61c878 nixos/boot: properly override the kernel in boot.kernelPatches
Previously the code took the kernelPatches of the final derivation, which
might or might not be what was passed to the derivation in the original call.
The previous behaviour caused various hacks to become neccessary to avoid duplicates in kernelPatches.
2021-05-31 12:10:19 +02:00
Naïm Favier a6788be01a
nixos/luksroot: add bypassWorkqueues (#118114)
https://wiki.archlinux.org/index.php/Dm-crypt/Specialties#Disable_workqueue_for_increased_solid_state_drive_(SSD)_performance
2021-05-26 09:43:38 -04:00
Vincent Haupert faeb9e3233
nixos/networkd: add missing [DHCPServer] options
`systemd.network.networks.*.dhcpServerConfig` did not accept all of
the options which are valid for networkd's [DHCPServer] section. See
systemd.network(5) of systemd 247 for details.
2021-05-17 18:30:37 +02:00
hyperfekt 3e3e763a07 nixos/systemd: enable systemd-pstore.service
As described in issue #81138, the Install section of upstream units is
currently ignored, so we make it part of the sysinit.target manually.
2021-05-09 23:21:51 +02:00
Silvan Mosberger 08d94fd2b0
Merge pull request #114374 from oxalica/lib/platform-support-check
lib.meta: introduce `availableOn` to check package availability on given platform
2021-05-08 03:54:36 +02:00
Pacman99 87c659ab94 nixos/top-level: specialArgs to specialisations 2021-05-06 16:04:08 -07:00
Luke Granger-Brown 2136e90fa3
Merge pull request #114637 from KaiHa/pr/fix-systemd-boot-builder
systemd-boot-builder.py: ignore profile names with invalid chars
2021-04-25 11:35:00 +01:00
Konrad Borowski 66b2aaf2eb Revert "nixos/systemd: provide libidn2 for systemd-resolved"
This patch is no longer necessary with systemd v247.3.

This reverts commit c674a51382.
2021-04-12 18:37:18 +02:00
github-actions[bot] 85b57e4446
Merge master into staging-next 2021-04-08 18:14:17 +00:00
ajs124 c6d4dae35d treewide: fix eval without aliases after 9378fdf87e 2021-04-08 13:33:09 +02:00
Jan Tojnar c04a14edd6 Merge branch 'master' into staging-next 2021-04-06 16:01:14 +02:00
Gabriel Ebner c709fd42d9 nixos/systemd: increase default numeric PID range 2021-04-03 10:11:52 +02:00
oxalica 354d262db8
lib.meta: introduce availableOn 2021-04-02 19:20:23 +08: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
github-actions[bot] b9456ca263
Merge master into staging-next 2021-03-28 18:14:11 +00:00
Linus Heckemann 4aacd02d33
Merge pull request #115792 from ncfavier/patch-2
nixos/stage-1: make cpio quiet
2021-03-28 14:38:46 +02:00
Jean-Baptiste Giraudeau 1665c5290c
nixos/systemd: add namespaced (templated) journald sockets and service 2021-03-24 16:57:33 +01:00
github-actions[bot] 39e3812215
Merge master into staging-next 2021-03-23 06:18:02 +00:00
Peter Hoeg 6b815bbb99 nixos/systemd: missing a few units for KDE to use systemd 2021-03-23 09:44:34 +08:00
github-actions[bot] 11ee0bf5d7
Merge master into staging-next 2021-03-23 00:40:24 +00:00
Sander van der Burg 8fc9423565
Merge pull request #116455 from svanderburg/systemdunitpath
systemd: allow custom unit folders to be configured with SYSTEMD_UNIT…
2021-03-22 22:58:49 +01:00
Sander van der Burg 5c8ed06fc9 systemd: allow custom unit folders to be configured with SYSTEMD_UNIT_PATH 2021-03-22 20:41:12 +01:00
github-actions[bot] 933682b533
Merge master into staging-next 2021-03-20 18:19:30 +00:00
Jörg Thalheim 1fc14408ae
Merge pull request #108952 from Mic92/systemd-builder
nixos/systemd-boot: add typechecking
2021-03-20 16:05:27 +00:00
github-actions[bot] 29278dcf45
Merge staging-next into staging 2021-03-19 12:26:59 +00:00
Alexander Foremny 297b1ba320 Revert "nixos/systemd: Handle template overrides"
This reverts commit e3b90b6ccc.

This commit broke container tests and thus blocked channels from
advancing.
2021-03-19 09:05:33 +01:00
github-actions[bot] 8c03075f07
Merge staging-next into staging 2021-03-19 00:41:08 +00:00
Florian Klink 68d6ffc8d5
Merge pull request #115549 from adrianparvino/new-nixos-unstable
systemd: Handle template overrides
2021-03-16 23:05:11 +01:00
Jean-Baptiste Giraudeau 77b7d29bf8
nixos/switch-to-configuration: don't try restart deleted sockets 2021-03-11 11:34:16 +01:00
Adrian Parvin D. Ouano e3b90b6ccc nixos/systemd: Handle template overrides
Adding template overrides allows for custom behavior for specific
instances of a template. Previously, it was not possible to provide
bind mounts for systemd-nspawn. This change allows it.
2021-03-11 10:21:14 +08:00
Naïm Favier d4d5fc6bd7
nixos/stage-1: make cpio quiet 2021-03-10 17:46:53 +01:00
Florian Klink 7db55b3aa5
Merge pull request #115584 from grahamc/systemd-modprobe-service
systemd: add the modprobe service
2021-03-09 22:12:25 +01:00
Graham Christensen 0b52c40240
nixos/systemd: bring in modprobe@.service
It is broken: it looks for /sbin/modprobe, but it works anyway??
2021-03-09 12:38:54 -05:00
Linus Heckemann c762b1eaab
Merge pull request #90065 from wizeman/u/fix-config-merge
linux: make sure all config options have the same value
2021-03-08 21:34:59 +01:00
Ricardo M. Correia 6feb61233b linux: make sure all config options have the same value
Currently, kernel config options whose value is "yes" always override
options whose value is "no".

This is not always desired.

Generally speaking, if someone defines an option to have the value
"no", presumably they are disabling the option for a reason, so it's
not always OK to silently enable it due to another, probably unrelated
reason.

For example, a user may want to reduce the kernel attack surface and
therefore may want to disable features that are being enabled in
common-config.nix.

In fact, common-config.nix was already silently enabling options that
were intended to be disabled in hardened/config.nix for security
reasons, such as INET_DIAG.

By eliminating the custom merge function, these config options will
now use the default module option merge functions which make sure
that all options with the highest priority have the same value.

A user that wishes to override an option defined in common-config.nix
can currently use mkForce or mkOverride to do so, e.g.:

BINFMT_MISC = mkForce (option no);

That said, this is not going to be necessary in the future, because
the plan is for kernel config options defined in nixpkgs to use a
lower priority by default, like it currently happens for other module
options.
2021-03-07 18:27:14 +01:00
WORLDofPEACE 583f1a96b1
Merge pull request #114000 from worldofpeace/plymouth-bgrt
nixos/plymouth: use bgrt theme
2021-03-04 18:32:30 -05:00
Kai Harries e2be5dc1f4 systemd-boot-builder: gracefully ignore errors during entry creation
Catch and ignore errors during writing of the boot entries.  These
errors could stem from profile names that are not valid filenames on
vfat filesystems.

fixes #114552
2021-03-02 20:17:57 +01:00
Linus Heckemann 08fc5e317c
Merge pull request #111802 from twhitehead/init-symlinks
nixos/stage1: chroot stage 2 init exists check so symlink resolve
2021-03-02 13:32:26 +01:00
Florian Klink aed9171b1a
Merge pull request #111342 from veehaitch/systemd-networkd-options
nixos/networkd: add missing IPv6 options
2021-02-27 00:16:20 +01:00
WORLDofPEACE 9e84dc00b0 nixos/plymouth: use white nixos logo
This looks cohesive with the spinner in the bgrt theme.
2021-02-25 16:46:03 -05:00
WORLDofPEACE 6bd4f9a3c5 nixos/plymouth: use bgrt theme
The BGRT theme is probably a close as to "FlickerFree" we can
get without https://github.com/NixOS/nixpkgs/pull/74842.
It's more agnostic than the Breeze theme.

We also install all of themes provided by the packages, as it's possible
that one theme needs the ImageDir of another, and they're small files
anyways.

Lastly, how plymouth handles logo and header files is
a total mess, so hopefully when they have an actual release
we won't need to do all this symlinking.
2021-02-25 16:46:03 -05:00
WORLDofPEACE 726dd9804e nixos/plymouth: exit on missing theme
Much better to provide a helpful message than to
get an obscure sed message.
2021-02-25 16:46:03 -05:00
Tyson Whitehead aed7c9a22a
stage-1: accept init symlinks at any level 2021-02-25 15:58:18 -05:00
Edmund Wu f4208fe9f9 nixos/plymouth: use upstream defaults
https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/101
75204a2517/src/plymouthd.defaults
2021-02-25 15:18:49 -05:00
WORLDofPEACE 0c3514f782
Merge pull request #99011 from andersk/plymouth-label
nixos/plymouth: Add label plugin and a font to the initrd
2021-02-21 15:44:54 -05:00
Anders Kaseorg 9d21f1dfab nixos/plymouth: Add label plugin and a font to the initrd
This allows Plymouth to show the “NixOS 21.03” label under the logo at
startup like it already does at shutdown.

Fixes #59992.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2021-02-21 10:27:15 -08:00
Michele Guerini Rocco 19d715c573
Merge pull request #107382 from rnhmjoj/no-udev-settle
nixos/{networkd,dhcpcd}: remove udev-settle hack
2021-02-20 20:49:19 +01:00
Florian Klink 68496cb927
Merge pull request #113570 from xaverdh/remove-systemConfig
Remove system config kernel parameter
2021-02-19 20:43:07 +01:00
Guillaume Girol 56923181e9
Merge pull request #107402 from ctem/fix/luksroot-master
boot.initrd.luks: add reusePassphrases support for YubiKey 2FA
2021-02-19 15:42:45 +00:00
Sandro Jäckel c75d7d2f8c
nixos/grub: fix editor check 2021-02-18 22:25:57 +01:00
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
Dominik Xaver Hörl 0e8d7f9b3d nixos/install-grub: normalize whitespace 2021-02-18 20:51:34 +01:00
Dominik Xaver Hörl 61d746a7d3 nixos: don't set systemConfig for stage-2
Since c4f910f550, this is no longer
needed, because stage-2 is already generated with the path hard wired anyway.
2021-02-18 12:48:08 +01: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
Chuck df25ca8520 nixos/activation-script: Run userActivationScripts at login
Fixes https://github.com/NixOS/nixpkgs/issues/113240
2021-02-16 10:10:45 -08: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
Ctem 1c9b2f18ce
boot.initrd.luks: fix case Yubikey -> YubiKey 2021-02-08 04:01:47 +09:00
Ctem 9e8781328e
boot.initrd.luks: add reusePassphrases support for YubiKey 2FA 2021-02-08 03:55:17 +09: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
Fritz Otlinghaus 56c42142ed Revert "nixos/top-level: add specialisation.<name>.configuration type"
This reverts commit 05fbc82771.
2021-02-05 17:49:06 +01: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
Fritz Otlinghaus 05fbc82771 nixos/top-level: add specialisation.<name>.configuration type 2021-02-03 16:27:22 -08:00
Luflosi cfb06016e8
nixos/availableKernelModules: add cherry hid
This adds support for Cherry USB keyboards at boot.
2021-02-01 18:25:18 +01: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
Vincent Haupert e6660ffe7f
nixos/networkd: rename ipv6PrefixDelegationConfig option to ipv6SendRAConfig
networkd's [IPv6PrefixDelegation] section and IPv6PrefixDelegation=
options have been renamed as [IPv6SendRA] and IPv6SendRA= in systemd
247.

Throws if the deprecated option ipv6PrefixDelegationConfig is used.
2021-01-30 14:54:11 +01:00
Vincent Haupert 735111487b
nixos/networkd: add ipv6AcceptRAConfig option
Adds `systemd.network.networks.*.ipv6AcceptRAConfig` for networkd's
[IPv6AcceptRA] section.
2021-01-30 14:06:44 +01:00
Vincent Haupert 38f19af769
nixos/networkd: add dhcpV6PrefixDelegationConfig option
networkd gained a new section [DHCPv6PrefixDelegation] which
controls delegated prefixes assigned by DHCPv6 client. Added in systemd
246.
2021-01-30 14:06:27 +01:00
Vincent Haupert 53033aaf5a
nixos/networkd: add missing dhcpV6Config options 2021-01-30 12:50:22 +01: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
Ben Siraphob 1c2a2b0a08 treewide: fold -> foldr 2021-01-26 10:57:07 +07: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
Jörg Thalheim ceda1a5eee
nixos/systemd-boot: add typechecking 2021-01-10 21:13:59 +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