Commit graph

2579 commits

Author SHA1 Message Date
nikstur c9569af3e0
Merge pull request #271326 from philiptaron/shutdown.target
treewide: depend on `shutdown.target` if `DefaultDependencies=no` in almost every case
2023-12-27 08:33:26 +01:00
Florian Klink 011e924109
Merge pull request #239201 from nesteroff/fix-timesync
systemd: disable NSCD when DNSSEC validation is disabled in timesyncd
2023-12-20 22:22:52 +02:00
github-actions[bot] a1cd7ca146
Merge master into staging-next 2023-12-20 18:00:56 +00:00
Maciej Krüger ff680a4c39
Merge pull request #207717 from jpathy/patch-2 2023-12-20 13:52:03 +01:00
github-actions[bot] 176c80219d
Merge master into staging-next 2023-12-20 12:00:53 +00:00
Yuri Nesterov 6008246790 systemd: disable NSCD when DNSSEC validation is disabled in timesyncd
When a system has a wrong date and time timesyncd is unable to synchronize it
because DNSSEC doesn't work. In order to break this chicken and egg problem
systemd-timesync disables DNSSEC validation by setting
SYSTEMD_NSS_RESOLVE_VALIDATE=0 in the unit file. However, it doesn't work in
NixOS because it uses NSCD. This patch disables NSCD in systemd-timesyncd when
SYSTEMD_NSS_RESOLVE_VALIDATE is set to 0 so that it uses NSS libraries
directly. In order for it to be able to find the libnss_resolve.so.2 library
this patch adds the systemd directory in the nix store to the LD_LIBRARY_PATH.
2023-12-20 13:21:43 +02:00
Florian Klink c28f238f5a
Merge pull request #272946 from benaryorg/resolved_no_fallback
nixos/resolved: Allow upstream fallback override
2023-12-20 12:55:44 +02:00
github-actions[bot] 782f18b6fe
Merge staging-next into staging 2023-12-19 12:01:35 +00:00
Florian Klink 5a57cde110 nixos/systemd/initrd: add systemd-makefs unconditionally
As discussed in
https://github.com/NixOS/nixpkgs/issues/274310#issuecomment-1861842634,
the size increase is negligible, and this might be triggered via fstab
options or the cmdline too.

systemd-growfs is an online operation, so it's taken care of in stage 2.

Fixes https://github.com/NixOS/nixpkgs/issues/274310.
2023-12-19 08:38:03 +02:00
github-actions[bot] 5374345f82
Merge staging-next into staging 2023-12-19 00:02:47 +00:00
Sandro Jäckel 8c58a7cb4b
nixos/luksroot: add final newline to /etc/crypttab 2023-12-18 02:16:08 +01:00
jpathy 0225a786e5
nixos/networkd: allow IPv6LinkLocalAddressGenerationMode in networkConfig
Fixes: #199407 .
2023-12-17 19:39:59 +01:00
benaryorg 57846d0cae
nixos/resolved: Allow upstream fallback override
The previous code did not apply any changes to the upstream defaults on being presented with an empty list.
This changes the code to use the above behaviour on a `null` value while an empty list is passed through as normal which yields a systemd configuration line with empty value which resets it to an empty value.

Signed-off-by: benaryorg <binary@benary.org>
2023-12-15 13:07:05 +00:00
SaltyKitkat 679a417a7a Declare removed option with mkRemovedOptionModule 2023-12-13 16:43:34 +08:00
SaltyKitkat b2d6b30648 update oomd.nix
due to 7665e1796f
and 806c95e1c7
2023-12-13 16:35:39 +08:00
Ben Wolsieffer a514d8c148 systemd-stage-1: allow non-existent /lib/firmware
Since 1557027, makeModulesClosure doesn't create a lib/firmware
directory if there is no firmware in the initramfs. If this happens,
systemd-stage-1 fails to build.

/lib only contains /lib/modules and /lib/firmware, both of while are
from modulesClosure. Therefore, we can just add the entirety of
${modulesClosure}/lib to the initramfs to allow for the possibility that
lib/firmware doesn't exist. This also brings systemd-stage-1 in line
with the traditional stage-1.
2023-12-11 21:00:08 -05:00
Raito Bezarius eecfbe397a nixos/(tests/)journald-(remote|upload|gateway): add raitobezarius as a maintainer 2023-12-09 13:57:08 +01:00
Minijackson 2fb8bd4baf nixos/journald-upload: init 2023-12-09 01:50:23 +01:00
Minijackson 6410e72fd2 nixos/journald-remote: init 2023-12-09 01:50:23 +01:00
Minijackson 9ab63e1ad5 nixos/journald-gateway: init
move services.journald.enableHttpGateway -> services.journald.gateway.enable
2023-12-09 01:50:23 +01:00
maxine ad7955279d
Merge pull request #270011 from christoph-heiss/networkd-fix-wgpeer-doc
nixos/networkd: fix manpage for `WireGuardPeer` config
2023-12-06 00:33:05 +01:00
Camille Mondon 27493b4d49 nixos/clevis: init
Co-Authored-By: Julien Malka <julien@malka.sh>
2023-12-02 11:55:47 +00:00
Philip Taron 1f73c2a7b6
nixos/initrd-secrets: ensure correct ordering w.r.t. shutdown.target 2023-11-30 15:18:23 -08:00
Philip Taron 0db4d5b335
nixos/initrd-ssh: ensure correct ordering w.r.t. shutdown.target 2023-11-30 15:12:10 -08:00
Philip Taron e4136ed6dd
nixos/growpart: ensure correct ordering w.r.t. shutdown.target 2023-11-30 15:09:59 -08:00
K900 9ad22d35b6
Revert "nixos/switch-to-configuration: remove explicit tmpfiles invocation" 2023-11-29 09:38:27 +03:00
Bernardo Meurer ad1d3762bb
Merge pull request #269983 from nikstur/stc-tmpfiles
nixos/switch-to-configuration: remove explicit tmpfiles invocation
2023-11-28 18:26:44 -03:00
Will Fancher 7f213113e6
Merge pull request #218441 from tomfitzhenry/unl0kr
add boot.initrd.unl0kr
2023-11-28 16:10:11 -05:00
Christoph Heiss 4e08f16893
nixos/networkd: fix manpage for WireGuardPeer config
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-11-26 00:43:55 +01:00
nikstur fa41730b86 nixos/switch-to-configuration: remove explicit tmpfiles invocation 2023-11-25 21:39:10 +01:00
nicoo 744b456b49 nixos/systemd: Mark down the options description 2023-11-22 10:49:51 +00:00
nicoo 3f5e19aaf3 nixos/systemd: Link manpages in options' description 2023-11-22 10:49:50 +00:00
nicoo f1b17edaea nixos/systemd: Refactor package option 2023-11-22 10:49:50 +00:00
nicoo aba2edda44 nixos/systemd: Refactor references to config.systemd 2023-11-22 10:49:50 +00:00
nicoo 667e7ca0bd nixos/systemd: refactor option definitions
- factor out `config.systemd.`;
- remove `lib.mdDoc` no-op.
2023-11-22 10:49:50 +00:00
Ryan Lahfa cbd983e1cd
Merge pull request #266151 from JulienMalka/append-secret-reproducible 2023-11-19 16:16:01 +01:00
Will Fancher b606ebb355
Merge pull request #266990 from ElvishJerricco/systemd-boot-boot-pass-flags-to-update
nixos/systemd-boot: pass EFI variable flags during update too
2023-11-18 12:34:10 -05:00
Patrick Steinhardt a8617e2b0d nixos/networkd: allow configuring AckFilter for CAKE qdisc
The CAKE section for systemd.network units allows configuring whether or
not redundant ACKs should be dropped. This option corresponds to the
respective tc-cake(8) params "ack-filter", "ack-filter-aggressive" or
"no-ack-filter".

Add support for these values in the `cakeConfig` module so that users
can configure it.
2023-11-19 03:40:51 +11:00
Philip Taron bc7a939ced nixos/networkd: add [IPVLAN] and [IPVTAP] configuration options to systemd.netdev files
[IPVLAN](https://www.freedesktop.org/software/systemd/man/latest/systemd.netdev.html#%5BIPVLAN%5D%20Section%20Options)
[IPVTAP](https://www.freedesktop.org/software/systemd/man/latest/systemd.netdev.html#%5BIPVTAP%5D%20Section%20Options)
2023-11-18 08:43:21 +01:00
Philip Taron 7686f24675 nixos/networkd: add ipvtap kind to netdev and IPVTAP= to network
From `man systemd.netdev`: https://www.freedesktop.org/software/systemd/man/latest/systemd.netdev.html#Supported%20netdev%20kinds

From `man systemd.network`: https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#IPoIB=
2023-11-18 08:43:21 +01:00
Julien Malka 81e378618e
nixos/systemd-boot: allow for bootspec-less generations
Generation built with old versions of NixOS with no bootspec
support may still be present on the system and must be
accounted for.
2023-11-17 14:39:04 +01:00
Ryan Lahfa 75fbff2576
Merge pull request #263442 from JulienMalka/systemd-boot-bootspec 2023-11-15 08:40:19 +01:00
Samuel Dionne-Riel 3d88cc85dd
Merge pull request #262595 from tpwrules/fix-extra-config-documentation
nixos/kernel: correct kernelPatches.extraConfig documentation
2023-11-14 22:40:04 -05:00
zzywysm 3f4c802d26 initrd/autofs4: remove legacy references to autofs4 kernel module
Back in 2018, the kernel decided to remove the autofs4 module.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a2225d931f75ddd3c39f4d0d195fad99dfd68671

This caused immediate problems with systemd, so the kernel allowed autofs4 as a config option that would simply map back to autofs.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d02d21ea007b6b33cdaf15c2f84fb1fea996ecc2

Earlier this year, in July 2023, the kernel got tired of people not adapting to the autofs change, and forced the issue by fixing it within the kernel defconfigs, which NixOS uses as a starting point for their own kernel configs.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1f2190d6b7112d22d3f8dfeca16a2f6a2f51444e

This commit reflects the post-2018 reality by changing the remaining autofs4 references to autofs. Since this change initially happened in kernel 4.18 and we no longer support 4.x kernels, we don't need any backwards-compatibility tweaks.
2023-11-14 15:37:50 -05:00
Julien Malka 372d07dc29 nixos/systemd-boot: conform backend to RFC-0125
Now the builder is using Bootspec documents.
2023-11-14 20:37:07 +01:00
Thomas Watson ca84c463b9 nixos/systemd-boot: pass EFI variable flags during update too
8f2babd032 was partially reverted by mistake. Original message below

---

On some systems, EFI variables are not supported or otherwise wonky.
bootctl attempting to access them causes failures during bootloader
installations and updates. For such systems, NixOS provides the options
`boot.loader.efi.canTouchEfiVariables` and
`boot.loader.systemd-boot.graceful` which pass flags to bootctl that
change whether and how EFI variables are accessed.

Previously, these flags were only passed to bootctl during an install
operation. However, they also apply during an update operation, which
can cause the same sorts of errors. This change passes the flags during
update operations as well to prevent those errors.

Fixes https://github.com/NixOS/nixpkgs/issues/151336
2023-11-12 02:07:25 -05:00
Alois Wohlschlager 46bf585892
nixos/plymouth: drop the X11 renderer in the initrd
Previously, all available plymouth renderers were copied to the initrd,
including the X11 one. It is pretty much useless since the initrd is
exceedingly unlikely to run an X server, and causes the initrd closure to grow
by several large libraries (mostly Gtk and dependencies) and thus by a couple
of megabytes (over 5 MiB on my system). Remove it.
2023-11-11 20:12:14 +01:00
Anthony Roussel e30f48be94
treewide: fix redirected and broken URLs
Using the script in maintainers/scripts/update-redirected-urls.sh
2023-11-11 10:49:01 +01:00
Will Fancher 2f73652c34
Merge pull request #240651 from accelbread/postresumecommands
nixos/boot: add postResumeCommands option
2023-11-09 04:22:05 -05:00
Will Fancher eaad9ece24
Merge pull request #266116 from ElvishJerricco/sd-s1-user-shells-fix-warning
nixos/initrd-ssh: Only warn about shell when using systemd initrd
2023-11-07 21:25:21 -05:00
Julien Malka e626f8468b
nixos/stage1: make append_initrd_secrets script reproducible 2023-11-07 22:56:48 +01:00
Will Fancher 03f089e11d nixos/initrd-ssh: Only warn about shell when using systemd initrd 2023-11-07 13:28:31 -05:00
Maximilian Bosch 0597d1d179 nixos/journald: add storage option
While this can be added via `services.journald.extraConfig`, this option
provides proper type-checking and other modules can determine
where journal data is stored. This is relevant when using e.g. promtail
to send logs to Loki and it should read from `/run/log/journal` if
volatile storage is used.
2023-11-07 14:06:27 +01:00
Archit Gupta 2a4b82c461 nixos/boot: add postResumeCommands option
Adds a postResumeCommands option to the initramfs to allow inserting
code to execute after the device has attempted to resume, and before
filesystems are mounted. This allows to inject code for operations like
wiping the rootfs on boot; if those were instead put in
postDeviceCommands, on a hibernated device, they would execute before
the device resumes from hibernation.
2023-11-06 09:50:11 -08:00
Alyssa Ross d9105c28c8 nixos/stage-1: create initramfs /lib at build time
Modules built in to the kernel can attempt to load firmware before
init is started.  To guarantee the firmware is accessible to them
where they expect, /lib has to exist in the initramfs — it can't be
created later by init, because by that point the module may already
have tried and given up.
2023-11-06 14:35:34 +01:00
Thomas Watson be8065759e nixos/kernel: correct kernelPatches.extraConfig documentation
It hasn't expected the prefix for a long time (possibly ever). Other
documentation and patches within nixpkgs itself (such as the crashdump
module) do not have the prefix.
2023-11-05 16:00:15 -06:00
Julien Malka 33df4d3447
nixos/systemd-boot: add julienmalka as maintainer 2023-11-04 02:38:11 +01:00
Luka Blaskovic d3db35f684 stage-2: don't write to /dev/kmsg if missing 2023-10-30 21:53:52 +01:00
K900 998720bf94
Merge pull request #263849 from ElvishJerricco/sd-initrd-not-experimental
systemd-stage-1: No longer experimental
2023-10-30 20:04:20 +03:00
Will Fancher cca22054c0 systemd-stage-1: Add assertions for unsupported options. 2023-10-30 12:15:58 +01:00
Janne Heß d80d7d6697
Merge pull request #258071 from helsinki-systems/feat/stc-lock
nixos/switch-to-configuration: Lock the switch
2023-10-30 10:49:50 +01:00
Rémy Grünblatt c9e3cc43c7
nixos: fix iproute2 invocations (#263976)
When using iproute2's ip binary, you can omit the dev parameter, e.g. ip link set up eth0 instead of ip link set up dev eth0.

This breaks if for some reason your device is named e.g. he, hel, … because it is interpreted as ip link set up help.

I just encountered this bug using networking.bridges trying to create an interface named he.

I used a grep on nixpkgs to try to find iproute2 invocations using variables without the dev keyword, and found a few, and fixed them by providing the dev keyword.

I merely fixed what I found, but the use of abbreviated commands makes it a bit hard to be sure everything has been found (e.g. ip l set … up instead of ip link set … up).
2023-10-29 18:27:16 +01:00
Will Fancher 5cea7ee452
Merge pull request #262583 from ElvishJerricco/systemd-stage-1-shells
systemd-stage-1: Support for user shells
2023-10-29 13:22:47 -04:00
K900 7ea67d7cb6 Revert "nixos/activation: remove specialfs activationScript"
This reverts commit a8f50f9919.

Broke installer tests, need to figure out how to fix nixos-enter before attempting this again.
2023-10-29 20:08:48 +03:00
Robert Hensing 8b385c91c3
Merge pull request #263462 from nikstur/rebuildable-system
Rebuildable system & appliance
2023-10-29 08:02:35 +01:00
Linus Heckemann 8670794565
Merge pull request #263203 from nikstur/replace-activation
Replace simple activationScripts
2023-10-28 10:17:15 +02:00
tomf e426508098
Merge pull request #254412 from helsinki-systems/nvme-kmod-by-default
nixos/boot/kernel: include nvme kmod by default
2023-10-28 18:01:18 +11:00
Will Fancher a906632245 systemd-stage-1: No longer experimental 2023-10-27 16:46:47 -04:00
Nick Cao 020adc777c
Merge pull request #263492 from aschleck/patch-1
nixos/networkd: fix typoed hairpin option name
2023-10-26 13:28:52 -04:00
April Schleck 13956f7f1f nixos/networkd: fix typoed hairpin option name
You can see in https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html that
this should be "HairPin" not "Hairpin". Using "Hairpin" results in

```
Oct 25 18:55:03 my-host systemd-networkd[843736]: /etc/systemd/network/10-bridge.network:11:
    Unknown key name 'Hairpin' in section 'Bridge', ignoring.
```
2023-10-26 10:26:04 -07:00
nikstur b3c1d8c9ae nixos: add system.switch.enable flag
This flag allows the user to optionally exclude
switch-to-confguration.pl from toplevel.

This is interesting for appliance images where you don't want to re-build
the system. This flag is called `rebuildable` because the standard
interface to do this is `nixos-rebuild` which will not work anymore with
this change.
2023-10-26 17:47:35 +02:00
Lassulus 95a366309a
Merge pull request #262731 from Lassulus/tmpfiles
nixos/systemd-tmpfiles: add settings option
2023-10-26 09:29:46 +01:00
nikstur 256956e34d nixos/activation: link gcroot with tmpfiles instead of in activation 2023-10-26 01:44:21 +02:00
nikstur 88f63d1165 nixos/binfmt: replace activationScript via tmpfiles 2023-10-25 23:44:01 +02:00
nikstur a8f50f9919 nixos/activation: remove specialfs activationScript
The stage-2-init.sh script has the same functionality hardcoded so we do
not need it in the activationScript again.
2023-10-25 00:48:37 +02:00
nikstur 59e3726755 nixos/activation: replace var activationScript via tmpfiles 2023-10-25 00:48:37 +02:00
Julian Stecklina 3c1c4b65e9 nixos/timesyncd: replace activationScript via ExecPreStart 2023-10-25 00:48:35 +02:00
Martin Weinelt 0e4b63f713 Revert "nixos/systemd-boot: Avoid remote mypy executions"
This reverts commit ea0dcd0ae1.
2023-10-23 03:38:13 +02:00
DavHau cae154a67e nixos/systemd-tmpfiles: add settings option 2023-10-23 00:34:23 +02:00
Will Fancher 13f325005c
Merge pull request #262740 from ElvishJerricco/systemd-stage-1-improve-udhcpc-assertion
systemd-stage-1: Improve udhcpc assertion
2023-10-22 13:46:38 -04:00
Will Fancher 1a6c2e4837 systemd-stage-1: Improve udhcpc assertion 2023-10-22 09:12:34 -04:00
Will Fancher a662970807
Merge pull request #262167 from jakubgs/systemd/fix-autofs-config
systemd: rename required AUTOFS4_FS to AUTOFS_FS
2023-10-22 08:08:11 -04:00
nikstur 9b20e22b88
Merge pull request #262573 from ElvishJerricco/systemd-repart-stage-1-assertion
nixos/systemd-repart: Add assertion requiring systemd in initrd
2023-10-22 11:53:59 +02:00
Will Fancher 22325ce016 systemd-stage-1: Support for user shells 2023-10-21 13:24:16 -04:00
Will Fancher b57c850790 nixos/systemd-repart: Add assertion requiring systemd in initrd 2023-10-21 12:29:34 -04:00
nikstur 6958acea7e
Merge pull request #262179 from ElvishJerricco/systemd-stage-1-specific-fs-packages
systemd-stage-1: Use specific fs packages
2023-10-21 13:25:42 +02:00
Bjørn Forsman 142074c2a8 nixos: fix bad mkEnableOption descriptions
Fix descriptions that don't account for (1) the "Whether to enable"
prefix or (2) the automatically added trailing dot.
2023-10-20 16:22:40 +01:00
Janne Heß a1012b2160
nixos/switch-to-configuration: Allow not filtering units 2023-10-20 15:45:43 +02:00
Arian van Putten 0257e9f13a
Merge pull request #261449 from arianvp/growpart-online
nixos/grow-partition: Resize partition online instead of in initrd
2023-10-20 09:25:31 +00:00
Will Fancher 18013cc71e systemd-stage-1: Use specific fs packages 2023-10-19 21:13:22 -04:00
Jakub Sokołowski 26c4e35cea
systemd: rename required AUTOFS4_FS to AUTOFS_FS
The `AUTOFS4_FS` name appears to be a legacy naming stub:

>Ok, I ran the script, and also decided that we might as well remove
>the AUTOFS4 legacy naming stub entry by now.
>
>It has been five years, and people will have either picked up the new
>name with 'make oldconfig', or they just don't use 'make oldconfig' at
>all.

https://lore.kernel.org/lkml/CAHk-=wgK9-Tx4BxYMrc0pg==mcaz3cjWF6-CBwVpM_BZAmf4JQ@mail.gmail.com/#r

That has been remove in 6.6 kernel and results in a failure:
```
error:
       Failed assertions:
       - CONFIG_AUTOFS4_FS is not enabled!
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-10-20 01:44:13 +02:00
nicoo ea0dcd0ae1 nixos/systemd-boot: Avoid remote mypy executions 2023-10-19 20:58:52 +01:00
Arian van Putten 80a578580f nixos/grow-partition: Resize partition online instead of in initrd
There's no reason to do this in initrd. Partitions can be resized online.
We just have to make sure it happens before we resize the file system.

This also makes grow-partition work with systemd-initrd
2023-10-19 12:34:27 +00:00
Philip Taron 173a3a25f0
Remove restriction on PhysicalDevice being int; reformat and document the Type field 2023-10-17 09:43:37 -07:00
Philip Taron 989cca26c4
systemd.network.netdev: Add support for WLAN devices
These are virtual interface, where one physical wifi adapter can have
more than one interface.

See https://systemd.network/systemd.netdev.html#%5BWLAN%5D%20Section%20Options
and dedf2d0054
2023-10-16 15:04:44 -07:00
Tom Fitzhenry 69e24a579c nixos/module: add boot.initrd.unl0kr 2023-10-16 21:33:02 +11:00
Jörg Thalheim b7057368c8 systemd-boot-builder: add missing fsync in atomic writes
write(2) and close(2) doesn't ensure the file content actually got synched, so let's also fsync before doing the rename
2023-10-10 14:49:51 +02:00
Jörg Thalheim 865a2cf8c1 Revert "nixos/systemd-boot: skip EFI update to 252"
This reverts commit 80665d606a.

Parsing the package version broke our systemd-boot builder test.

i.e. it won't be able to parse systemd-boot efi binaries coming from
ubuntu

We no longer use the faulty systemd-boot version so this code should no
longer be needed.
2023-10-10 14:49:51 +02:00
Jörg Thalheim b7fbd1ffd4 systemd-boot-builder: use regex prefix string
otherwise there are warnings for \.
2023-10-10 14:49:51 +02:00
Jörg Thalheim 5ee9fdf929 systemd-boot-builder: use new builtin typing style 2023-10-10 14:49:51 +02:00
Jörg Thalheim e20a886f87 systemd-boot-builder: drop unused import 2023-10-10 14:49:51 +02:00
Jörg Thalheim a17f41ed0b systemd-boot-builder: replace mkdir_p function with stdlib equivalent 2023-10-10 14:49:51 +02:00
Jörg Thalheim f4bf9702be systemd-boot-builder: always do syncfs, even after a failure 2023-10-10 14:49:51 +02:00
Jörg Thalheim dbac7467ad systemd-boot-builder: drop semicolons
this is python, not C.
2023-10-10 14:49:51 +02:00
Jörg Thalheim 1f70361d08 systemd-boot-builder: resort imports according to isort
foo
2023-10-10 14:49:51 +02:00
Florian Klink 7239f0198e
Merge pull request #258920 from ElvishJerricco/systemd-stage-1-full-build
systemd-stage-1: Default to full systemd build.
2023-10-04 12:02:36 +03:00
Florian Klink 42f2e2dadd
Merge pull request #257510 from ign0tus/fix/wake-on-lan-policy
Fix: WakeOnLan policy
2023-10-04 11:36:16 +03:00
Will Fancher 710b96b191 systemd-stage-1: Default to full systemd build. 2023-10-04 04:21:35 -04:00
Florian Klink d89aa11c89
Merge pull request #258345 from lf-/jade/wait-for-online
nixos/networkd: fix wait-online on networking.useDHCP default configuration
2023-10-04 10:58:14 +03:00
Will Fancher 37601de942
Merge pull request #237154 from ElvishJerricco/sd-s1-networkd-flush-with-keep-configuration
systemd stage 1 networking: Use KeepConfiguration
2023-10-03 23:37:03 -04:00
Jade Lovelace 28ab2b278d nixos/networkd: make wait-online not time out
A further bug to our strange multi-user.target depending on
network-online.target issue is that systemd recently changed the
behaviour of systemd-networkd-wait-online to no longer consider the
absence of interfaces with RequiredForOnline to be sufficient to be
online: https://github.com/systemd/systemd/pull/27825

On the advice of the systemd developers
(https://github.com/systemd/systemd/issues/29388), this commit changes
the configuration of systemd-networkd-wait-online to pass --any by
default, and lets the default DHCP interfaces be RequiredForOnline
as they would be by default if the option is omitted.

It is plausible that systemd-networkd-wait-online may still fail if
there are no interfaces at all. However, that probably cannot be
avoided.
2023-10-02 14:47:21 -07:00
Ryan Lahfa 3c3ef90189
Merge pull request #242191 from tie/systemd-required-for-online-range 2023-09-30 01:16:21 +02:00
Janne Heß 5d7723dd5b
nixos/switch-to-configuration: Lock the switch
This prevents any concurrent switches from happening which is not an
issue I have seen people complaining about but it seems like a good
measure.
2023-09-29 19:46:10 +02:00
Adam Stephens b1237da5b2
systemd: revert allow udev-trigger for lxd nested containers 2023-09-28 13:58:11 -04:00
ign0tus 237f7ba7d2 networkd: Allow combinations of WakeOnLan policies
To comply with the systemd.link WakeOnLan[^1] specification, the option
"off" and all other possible policy combinations must be allowed.

[^1]: https://www.freedesktop.org/software/systemd/man/systemd.link.html#WakeOnLan=
2023-09-28 17:04:35 +02:00
Mario Rodas 25b9f4d2b6
Merge pull request #255116 from adamcstephens/lxd/udev-container
systemd: allow udev-trigger to run on lxd containers with nesting
2023-09-28 02:17:27 -05:00
Ryan Lahfa 12eb1e5d28
Merge pull request #249412 from JTarasovic/jdt/systemd-networkd/ipv6-assign-prefix 2023-09-27 18:39:00 +02:00
Ryan Lahfa cb403e56a6
Merge pull request #249386 from JTarasovic/jdt/systemd-networkd/dhcpv6config 2023-09-27 18:38:16 +02:00
github-actions[bot] fc1f757bf6
Merge master into staging-next 2023-09-25 18:01:06 +00:00
Yureka 6500b4580c
Revert "nixos/boot/rasbperrypi: add support for boot.initrd.secret with uboot (#240358)" (#257251)
This reverts commit 94e939985b.
2023-09-25 14:22:51 +02:00
github-actions[bot] ab2ecc25c1
Merge master into staging-next 2023-09-23 18:00:59 +00:00
Janne Heß cc55ef9d55
Merge pull request #254993 from helsinki-systems/feat/stc-mount-improvements
nixos/switch-to-configuration: Mount improvements and a lot more test cases
2023-09-23 17:03:13 +02:00
digital 94e939985b
nixos/boot/rasbperrypi: add support for boot.initrd.secret with uboot (#240358)
Co-authored-by: digital <didev@dinid.net>
2023-09-23 14:32:09 +02:00
Giorgio Gallo fed5af2d15
nixos/systemd: update rateLimitBurst documentaion.
This updates the documentation for the services.journald.rateLimitBurst
option, clarifying that the journal size limit may very well default to
a lot less than 4GB with small disks or disk with not much free space
(eg: virtualized machines)
2023-09-22 16:34:59 +02:00
Janne Heß 85c1c30fd9
nixos/switch-to-configuration: Never unmount / or /nix
Also adds a huge test for fstab handling
2023-09-22 10:26:10 +02:00
github-actions[bot] 3245a21e71
Merge master into staging-next 2023-09-19 06:01:00 +00:00
Artturi 73d552ecb7
Merge pull request #254918 from RaitoBezarius/dnssec-resolved 2023-09-19 06:45:07 +03:00
Erno Hopearuoho 7d112f7da3 luksroot: fix issue when yubikey is detached during boot process
Fixes #228141, which describes an issue where detaching Yubikey during the boot process
causes cryptsetup to write empty passphrase instead of the challenge-response salt stored
on the boot drive.
2023-09-18 23:10:06 -03:00
github-actions[bot] cb25ab46c1
Merge master into staging-next 2023-09-18 00:02:10 +00:00
Jörg Thalheim fd6901755d stage1: use correct zfs package
This in particular broke zfsUnstable because it added symbols not present in zfsStable
2023-09-17 21:11:29 +02:00
Adam Stephens 8565cd862a
systemd: allow udev-trigger to run on lxd containers with nesting 2023-09-14 09:17:33 -04:00
Janne Heß d1c1335908
nixos/switch-to-configuration: Test more action things 2023-09-13 16:42:19 +02:00
Raito Bezarius 97ee93da10 systemd: apply upstream patch for tmpfiles
This fixes notably the fact that /dev/zfs was not usable anymore as a user,
and potentially other things.

Tracked in systemd upstream under issue number 28653, 28765.
2023-09-13 12:02:41 +02:00
Raito Bezarius fe6e299381 systemd: 253.5 -> 254-rc1
This is an early preparation for systemd v254 which causes some patch reflows
and EFI-related cleanups to their new build system with elf2efi, requiring pyelftools
as a Python packge.
2023-09-13 12:02:39 +02:00
Raito Bezarius 4f461f7b77 nixos/modules/system/resolved: disable DNSSEC validation by default
Historically, we allowed downgrade of DNSSEC, but some folks argue
this may decrease actually the security posture to do opportunistic DNSSEC.

In addition, the current implementation of (opportunistic) DNSSEC validation
is broken against "in the wild" servers which are usually slightly non-compliant.

systemd upstream recommended to me (in personal communication surrounding
the All Systems Go 2023 conference) to disable DNSSEC validation until
they work on it in a significant capacity, ideally, by next year.
2023-09-13 11:49:16 +02:00
Artturi 48a57a9884
Merge pull request #254480 from andersk/memtest86plus-name 2023-09-12 18:19:50 +03:00
Maciej Krüger 78e149fba3
Merge pull request #244722 from mdlayher/mdl-dhcp 2023-09-11 21:12:56 +02:00
Anders Kaseorg 191dee486f nixos/systemd-boot: Fix Memtest86+ name.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2023-09-10 18:44:20 -07:00
Florian Klink 688d95b6e6
Merge pull request #254056 from n8henrie/master
Include note about systemd default watchdog reboot time
2023-09-10 16:07:44 +02:00
ajs124 5ccc7d632b nixos/boot/kernel: include nvme kmod by default 2023-09-10 15:39:54 +02:00
Andrew Marshall 3f9cc71228 nixos/networkd: Fix incorrectly treating attrset as list
This reverses a [change made during PR review][1] that I did not sufficiently
test, causing [this error][2].

[1]: https://github.com/NixOS/nixpkgs/pull/249643#discussion_r1309151135
[2]: https://github.com/NixOS/nixpkgs/pull/249643#issuecomment-1712707336
2023-09-10 00:54:42 -04:00
Artturi b3e16d6e10
Merge pull request #254166 from Artturin/fixthingy1 2023-09-09 19:56:02 +03:00
Janne Heß 6b8306c21c
Merge pull request #249643 from amarshall/networkd-reload
nixos/networkd: Reload (not restart) when only .network units change
2023-09-09 17:31:09 +02:00
Janne Heß a71936c70f
Merge pull request #254027 from luochen1990/feature-better-binfmt
nixos/binfmt: improve type annotations
2023-09-09 17:24:53 +02:00
Artturin f25f2a4209 nixos/stage-2-init: dont use install to create /etc/nixos if it's a symlink
it should be checking that it is not a broken symlink but bash
conditionals are difficult

-d was causing the directory to not be created if it does not exist

```
$ install -m 0755 -d $PWD/hello
$ ls
hello/
$ ln -s something notexist
'notexist' -> 'something'
$ ls -l
lrwxrwxrwx artturin artturin 9 B Sat Sep  9 06:59:44 2023 notexist@ ⇒ something
drwxr-xr-x artturin artturin 2 B Sat Sep  9 06:59:36 2023 hello/
$ install -m 0755 -d $PWD/notexist
install: cannot change permissions of ‘/home/artturin/nixgits/my-nixpkgs/test/notexist’: No such file or directory
```
2023-09-09 07:22:05 +03:00
Nathan Henrie 5061d9daf0 systemd.watchdog: (docs): include note about systemd default watchdog reboot time
I found it very confusing to get an error message on reboot about `10min` when that didn't seem to be the NixOS default.
2023-09-08 09:12:29 -06:00
LuoChen 9c5afb2f9a
nixos/binfmt: improve type annotations 2023-09-08 19:40:42 +08:00
Jared Baur c47f423a9d
nixos/systemd-initrd: disable tpm-crb if on armv7l-linux
In addition to the existing riscv64 exception, also disable adding the
tpm-crb module to the initrd if the host platform is armv7.
2023-09-07 00:38:55 +02:00
Florian Klink 0a49365db9
Merge pull request #253498 from elohmeier/tpmfix
boot.initrd.systemd: make TPM2 modules optional
2023-09-06 11:49:47 +03:00
Ivan Trubach bc644aee70 nixos/networkd: allow state ranges in RequiredForOnline
RequiredForOnline takes a boolean or a minimum operational state and an
optional maximum operational state. In the latter case, range values are
separated with colon.
2023-09-04 20:38:54 +03:00