Commit Graph

3816 Commits

Author SHA1 Message Date
Aleksana
96bb033adb nixos/zswap: init module (#470366) 2026-04-10 16:59:03 +00:00
nikstur
c2b2ba8274 systemd: drop 0008-localectl-use-etc-X11-xkb-for-list-x11.patch
This can now configured via an environment variable.
2026-04-10 00:38:52 +02:00
Will Fancher
cab68b0f2f nixos: completely remove systemd-udev-settle.service (#504510) 2026-04-09 19:33:37 +00:00
nixpkgs-ci[bot]
372dae743d Merge master into staging-nixos 2026-04-09 00:24:40 +00:00
nixpkgs-ci[bot]
14ea16a965 Merge master into staging-next 2026-04-09 00:23:29 +00:00
rnhmjoj
1e4eb2df3f nixos: completely remove systemd-udev-settle.service
This service is essentially a random sleep() call that old software that
is unable to properly handle modern hardware initialisation being
asynchronous can use to *mostly* get by.

Over the years is has caused so many issues in NixOS, like introducing
long delays in the boot process[1], complete deadlocks[2] and even failures
when reloading services or activating a new configuration[3].

systemd has been discouraging its use since 2011 (15 years ago!), then
it officially deprecated it in 2018 and since 2020 it started to show on
every boot a huge wall of text calling out all the offending services
that still use it.

Around 2021 we managed to fix around 15 NixOS modules[4] that were
relying on systemd-udev-settle and practically ZFS[5] was the only
remaining one. However, since then, people have actually started to
bring it back with new services[6][7][8]. This is not acceptable.

So, to prevent any more (lazy) uses of systemd-udev-settle, we stop
providing the systemd-udev-settle.service unit entirely. For existing
modules that unfortunately still need it, we replace it with the command
`udevadm settle --timeout=180`, which is all that the service does.
Hopefully this will also increase the awareness that it's bad and
something to be fixed.

Note: I tested this change using

 - `nixosTests.zfs`,
 - `nixosTests.ifstate`,
 - `nixosTests.misc`,
 - `nixosTests.openvswitch`,
 - `nixosTests.predictable-interface-names`
 - `nixosTests.nvidia-container-toolkit`

and making sure that none of the 165 packages that provide upstream
units (via the `systemd.packages` option) had a dependency on
systemd-udev-settle.service.

[1]: https://github.com/NixOS/nixpkgs/pull/25311
[2]: https://github.com/NixOS/nixpkgs/issues/107341
[3]: https://github.com/NixOS/nixpkgs/pull/113804
[4]: https://github.com/NixOS/nixpkgs/issues/73095
[5]: https://github.com/openzfs/zfs/issues/10891
[6]: https://github.com/NixOS/nixpkgs/pull/257525#discussion_r1442702970
[7]: https://github.com/NixOS/nixpkgs/pull/460075
[8]: https://github.com/NixOS/nixpkgs/pull/284507
2026-04-08 21:11:35 +02:00
Florian Klink
393cbd4189 nixos/systemd: fix modprobe (#507397) 2026-04-08 17:31:37 +00:00
Robert Hensing
b6f7d1c851 nixos/tmpfiles: fix layer inversion
The nix module uses tmpfiles, not the other way around.
Move definitions so that tmpfiles does not depend on the nix module.
This makes the tmpfiles module usable without loading a nix module.
2026-04-08 14:14:01 +02:00
K900
b3054f010f Enable systemd stage 1 by default (#435781) 2026-04-08 05:08:43 +00:00
Will Fancher
5620d245ad nixos/systemd-stage-1: Enable by default 2026-04-07 21:53:09 -04:00
Will Fancher
222ee6e245 nixos/luksroot: Unhide crypttabExtraOpts 2026-04-07 21:53:09 -04:00
Will Fancher
2af908228d nixos/systemd-stage-1: Support rd.systemd.break= 2026-04-07 21:53:09 -04:00
phaer
9c32386c27 nixos/journald: move enableHttpGateway rename to journald-gateway.nix
journald.nix had mkRenamedOptionModule from enableHttpGateway to
services.journald.gateway.enable. Move it to journald-gateway.nix
where the target option is defined.
2026-04-07 19:46:00 +02:00
phaer
f1bf13d0a4 nixos/stage-1,swraid: move mdadmConf rename to swraid.nix
stage-1.nix had mkRenamedOptionModule from boot.initrd.mdadmConf to
boot.swraid.mdadmConf. Move it to tasks/swraid.nix where the target
option is defined.
2026-04-07 19:46:00 +02:00
Fabian Möller
18d69f6e9d nixos/systemd-networkd: Allow three value variant in ipv6AcceptRAConfig.RouteMetric option 2026-04-07 10:44:36 +02:00
nikstur
d36077c0b6 nixos/systemd: fix modprobe
Upstream systemd changed how modprobe is discovered. It is now searched
for on path. Thus, add the kmod package to the ExecSearchPath of the
modprobe@.service.
2026-04-07 00:30:27 +02:00
nixpkgs-ci[bot]
e8b5c14b83 Merge staging-next into staging 2026-04-06 06:39:57 +00:00
Will Fancher
d5fb4a5f56 nixos/filesystems: Remove default = "auto" from fsType (#444829) 2026-04-06 01:46:00 +00:00
nixpkgs-ci[bot]
01f34771b4 Merge staging-next into staging 2026-04-06 00:28:40 +00:00
Will Fancher
f8ed5f30c0 nixos/filesystems: Remove default = "auto" from fsType
NixOS has traditionally enabled the `ext` family of file systems by
default. Originally, when switching to systemd initrd, we wanted to
transition to making this explicit so that initrds could be made
without `ext`. The problem is that anyone with `fsType = "auto";` for
an `ext` file system in initrd will fail to boot, which is not really
an acceptable regression as we switch to systemd initrd by default.

By removing `default = "auto"` from `fsType`, we rule out the vast
majority of these regressions as eval errors, since most users of
`fsType = "auto"` for ext file systems are using it because of the
default value.

In hindsight, this is probably what #225352 was really about.
2026-04-05 19:06:28 -04:00
Robert Hensing
f303cb404b lib/services: move portable service infrastructure out of nixos/ (#506519) 2026-04-05 19:17:30 +00:00
Léana 江
3a8c4e697c nixos/limine: pass distroName using JSON 2026-04-05 14:28:35 +02:00
nixpkgs-ci[bot]
678aab4bed Merge staging-next into staging 2026-04-05 06:28:22 +00:00
Franz Pletz
7da10cc743 nixos/limine: show config.system.nixos.distroName value in menu (#506539) 2026-04-05 04:38:10 +00:00
Christian Kögler
e6909f5ac7 nixos/systemd-initrd: support omitting kernel parameter root 2026-04-04 22:57:44 +02:00
nixpkgs-ci[bot]
9b17ea8a06 Merge staging-next into staging 2026-04-04 12:11:47 +00:00
Léana 江
450c46303f nixos/limine: show config.system.nixos.distroName value in menu
Previously the entry section always shows "NixOS".
Now it would show the value configured in config.system.nixos.distroName.
2026-04-04 10:57:57 +02:00
Franz Pletz
ac5df5a861 nixos/systemd-networkd: Add missing network options to type checker (#506245) 2026-04-04 07:57:39 +00:00
nixpkgs-ci[bot]
fd1bf26f2d Merge staging-next into staging 2026-04-04 06:23:34 +00:00
cinereal
a338deb8a1 lib/services: move portable service infrastructure out of nixos/
Move the portable modular service base from
nixos/modules/system/service/portable/ to lib/services/, making it
importable by any module system (home-manager, nix-darwin) without
reaching into the nixos/ tree.

Moved files: service.nix, lib.nix, config-data.nix, config-data-item.nix,
test.nix. All external references updated (systemd/system.nix,
doc/manual/default.nix, assertions.nix, README.md).

No functional changes - only import paths differ.
2026-04-04 08:23:23 +02:00
Plopmenz
4ae5cb7634 nixos/systemd-networkd: Add missing network options to type checker
Co-authored-by: Franz Pletz <fpletz@fnordicwalking.de>
2026-04-04 07:28:57 +02:00
Franz Pletz
f7317ff87d nixos/networkd: fix typo (#506421) 2026-04-04 04:41:02 +00:00
nixpkgs-ci[bot]
badf05949a Merge staging-next into staging 2026-04-04 00:25:54 +00:00
2kybe3
277647238f nixos/networkd: fix typo 2026-04-04 00:26:29 +02:00
Emily
a38fe6041e Remove aes_generic usage (#504812) 2026-04-03 21:24:29 +00:00
nixpkgs-ci[bot]
ef0a9bf980 Merge staging-next into staging 2026-04-03 18:13:40 +00:00
Masum Reza
21601ecc68 nixos/limine: add settings autoGenerateKeys & autoEnrollKeys (#486777) 2026-04-03 18:12:28 +00:00
Linus Karl
26d2b87994 nixos/systemd-networkd: align options with upstream 2026-04-02 21:28:01 +02:00
nixpkgs-ci[bot]
304c5f4649 Merge staging-next into staging 2026-04-02 18:19:01 +00:00
nixpkgs-ci[bot]
4284ce68a7 Merge master into staging-nixos 2026-04-01 06:37:11 +00:00
nixpkgs-ci[bot]
f943263653 Merge staging-next into staging 2026-04-01 06:36:38 +00:00
Florian Klink
aad5e4ad77 systemd-networkd: add missing linkConfig options to type checker (#497731) 2026-04-01 00:32:15 +00:00
Jared Baur
ae8b3f7d55 nixos/luksroot: remove aes_generic
With kernel versions at 7.0 or greater, `aes_generic` no longer exists
and is now just called `aes`. The `aes` module alias has existed since
at least 5.10 (the oldest kernel currently in nixpkgs), so is sufficient
to load `aes_generic` on older kernels.
2026-03-29 14:12:27 -07:00
Jared Baur
984ec8fe43 nixos/stratisroot: remove aes_generic
With kernel versions at 7.0 or greater, `aes_generic` no longer exists
and is now just called `aes`. The `aes` module alias has existed since
at least 5.10 (the oldest kernel currently in nixpkgs), so is sufficient
to load `aes_generic` on older kernels.
2026-03-29 14:10:33 -07:00
Philip Taron
29f3ed0c0e systemd: 259.5 -> 260.1 (#501049) 2026-03-28 15:57:55 +00:00
nixpkgs-ci[bot]
b6721095e2 Merge master into staging-nixos 2026-03-27 00:27:34 +00:00
nixpkgs-ci[bot]
0b2d5b3b2f Merge staging-next into staging 2026-03-27 00:27:00 +00:00
Sandro
2d998e0c92 nixos/systemd-networkd: Add missing options to VLAN (#503063) 2026-03-26 20:44:02 +00:00
Thomas Gerbet
915093332c nixos/grub: re-install grub on package change (#495788) 2026-03-26 09:33:45 +00:00
r-vdp
8de047d3fa nixos/networkd: add systemd-networkd-varlink-metrics socket
Exposes io.systemd.Network metrics at
/run/systemd/report/io.systemd.Network
2026-03-25 11:39:23 +01:00