Commit graph

2435 commits

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