Commit Graph

3816 Commits

Author SHA1 Message Date
r-vdp
30b1e38435 nixos/journald: add systemd-journalctl varlink socket
New in systemd 260. Exposes io.systemd.JournalAccess at
/run/systemd/io.systemd.JournalAccess and registers it in
/run/varlink/registry/
2026-03-25 11:39:22 +01:00
r-vdp
f2c276dae1 systemd: 259.5 -> 260
Changes:
- autovt@.service moved from a static meson-installed symlink to an
  [Install] Alias= on getty@.service upstream. We do not process
  [Install] sections, and logind still hardcodes spawning
  autovt@ttyN.service on VT switch, so recreate the alias.
- kmscon: suppress getty@.service instead of autovt@.service.
  Add static pull-in of kmsconvt@tty1 via getty.target since logind
  does not spawn autovt on tty1 by design.
- modprobe@.service: upstream switched ExecStart from /sbin/modprobe to
  a bare 'modprobe' relying on PATH. Update the substitution to match
  the new form, since DEFAULT_PATH on NixOS is systemd's own bindir
  which has no modprobe.
- Remove stale substituteInPlace patterns for paths removed upstream
  (/bin/echo in test-fileio.c, /bin/cat in cat.c, /usr/bin/getent in
  nspawn-setuid.c)
- Remove dead CFLAGS overrides for POLKIT_AGENT_BINARY_PATH (replaced
  by runtime find_executable) and SYSTEMD_CGROUP_AGENTS_PATH (cgroup-v1
  leftover, gone before v259). Use --replace-fail for the remaining
  config.h substitution so future removals fail loudly.
- Remove deprecated meson options (sysvinit-path, sysvrcnd-path, libidn)
- Handle new pull-oci.c tar references
- Drop upstreamed patch 0017-meson.build-do-not-create-systemdstatedir.patch
2026-03-25 11:39:22 +01:00
Walter McKelvie
db7de8d884 systemd-networkd: add missing linkConfig options to type checker 2026-03-24 17:34:37 -04:00
nyanloutre
a0478e9e44 nixos/systemd-networkd: Add missing options to VLAN 2026-03-24 14:23:19 +00:00
Stefan Frijters
d7a461100a nixos/system/activation: use structuredAttrs instead of passAsFile 2026-03-22 12:58:16 +01:00
nixpkgs-ci[bot]
6554ffb2e0 Merge staging-next into staging 2026-03-22 06:18:41 +00:00
Philip Taron
cc39ca56a1 treewide: eliminate unnecessary __curPos usage in nixpkgs (#491160) 2026-03-22 05:37:19 +00:00
nixpkgs-ci[bot]
8776a42745 Merge staging-next into staging 2026-03-21 18:08:13 +00:00
Vladimír Čunát
d6acf1b543 Revert "nixos/initrd: refactor secrets option into secretPaths and extraSecretsHook" 2026-03-21 15:58:52 +01:00
nixpkgs-ci[bot]
d13eae4110 Merge staging-next into staging 2026-03-20 00:24:57 +00:00
nixpkgs-ci[bot]
83fd733037 Merge master into staging-next 2026-03-20 00:24:19 +00:00
Philip Taron
2d27bddcce nixos/portable: remove unnecessary _file in test
The module system's fallback is sufficient for this standalone test.
2026-03-19 11:45:37 -07:00
Josh Hoffer
b62dba13c6 nixos/systemd-boot: set strict error handling in installer script
Previously, if `boot.loader.systemd-boot.extraInstallCommands`
was non-empty, errors from `systemdBootBuilder` would be ignored.
2026-03-18 11:17:16 -07:00
Will Fancher
666304f6f1 systemd: 259.3 -> 259.5 (#499420) 2026-03-14 01:49:18 +00:00
r-vdp
e01ab04287 systemd: 259.3 -> 259.5 2026-03-13 20:01:18 +01:00
nixpkgs-ci[bot]
4f1c61e545 Merge master into staging-next 2026-03-13 18:11:40 +00:00
Florian Klink
d68202f306 nixos/systemd: move default sysctls from coredump module (#498495) 2026-03-13 14:20:43 +00:00
r-vdp
e2e702cb4e Merge commit 'ea5f21f20569' into staging-next
# Conflicts:
#	pkgs/by-name/ki/kitty/package.nix
2026-03-13 12:42:04 +01:00
Will Fancher
83817d62f7 nixos/systemd: Restrict register-machine to privileged users only
https://github.com/systemd/systemd/security/advisories/GHSA-4h6x-r8vx-3862
2026-03-12 19:32:19 -04:00
nixpkgs-ci[bot]
20fc1a16e1 Merge master into staging-next 2026-03-11 18:18:55 +00:00
Florian Klink
7ddf2675a9 nixos/network-interfaces: Add iplvan support (#493244) 2026-03-11 14:14:32 +02:00
Mikael Voss
1ee2f0b0ca nixos/systemd: move default sysctls from coredump module
The default systemd sysctl snippet contains various security‐relevant
settings, it is however only installed if systemd.coredump.enable is
enabled, despite these settings not being strictly related to
systemd-coredump.
2026-03-10 11:11:54 +01:00
lwb
c3f0c3ec35 nixos/limine: add settings autoGenerateKeys & autoEnrollKeys 2026-03-07 12:16:33 +08:00
LuoChen
9bcddd22fd nixos/zswap: use boot.kernel.sysfs to simplify dynamic reload 2026-03-06 09:50:50 +08:00
LuoChen
c1870198aa nixos/zswap: add activationScripts 2026-03-06 09:50:48 +08:00
LuoChen
8a9c90e696 nixos/zswap: init module 2026-03-06 09:50:46 +08:00
nixpkgs-ci[bot]
e4ac994375 Merge staging-next into staging 2026-03-04 18:15:00 +00:00
nixpkgs-ci[bot]
6a50bc9233 Merge master into staging-nixos 2026-03-04 00:24:04 +00:00
nixpkgs-ci[bot]
69181cf8fc Merge staging-next into staging 2026-03-04 00:23:25 +00:00
zowoq
255a11d604 shutdown: stop manually saving hwclock (#494162) 2026-03-03 22:49:26 +00:00
zowoq
0a7e5af935 nixos/systemd: convert sleep.extraConfig to RFC42-style settings (#493223) 2026-03-03 22:49:24 +00:00
r-vdp
cfc8eb2d3c nixos/systemd-resolved: add support to generate dns-delegate files
See https://www.freedesktop.org/software/systemd/man/258/systemd.dns-delegate.html
2026-03-03 17:41:54 +01:00
Oliver Schmidt
41997d49da nixos/grub: re-install grub on package change
Trigger re-installation of grub files when the store path of the grub
package changes.
This is consistent with how side-effects are executed in other parts of
NixOS, e.g. systemd service management, and ensures that the actually
running grub stays in sync with the grub package in the Nix store that
is part of the system closure.
In particular, this causes security patches or dependency changes to be
taken into effect without the need to bump the package version.

Impact:
This change causes a re-installation of grub for all systems,
due to the lack of a persisted grub store path in existing state files.

Background:
So far we only re-installed grub outside of the store when its its
version, the package name, or some flags changed.
This leads to the various security patches only fixing new installations
of grub and not existing ones. This has been like this for over a decade,
but it remains unclear why the implementation decision had been to
be overly cautious with modifying boot loader side effects.

Fixes #486315

PL-135147
2026-03-02 11:51:26 +01:00
nixpkgs-ci[bot]
8d13a0a53f Merge staging-next into staging 2026-03-02 06:20:30 +00:00
dram
93178f6a00 nixos/binfmt: Avoid adding to extra-sandbox-paths with fixBinary (#494593) 2026-03-02 02:42:23 +00:00
Svenum
40b42e9f70 nixos/network-interfaces: Add iplvan support 2026-02-27 09:17:46 +01:00
nixpkgs-ci[bot]
6c8992cf4c Merge staging-next into staging 2026-02-27 06:19:23 +00:00
dramforever
0de75c6179 nixos/binfmt: Avoid adding to extra-sandbox-paths with fixBinary 2026-02-26 15:20:55 +08:00
novenary
2b724de17a shutdown: stop manually saving hwclock
Nowadays, the RTC is fully managed by systemd and the kernel.

In userspace, timedated is enabled by default and the clock can be
adjusted with timedatectl.
Further, NixOS enables timesyncd by default, so the clock should be
synced to NTP as long as the system is connected to the internet.

Since early 2013 (Linux 3.9), CONFIG_RTC_SYSTOHC is available and on by
default. [1]
When userspace reports that NTP is synced, this causes the kernel to
periodically update the RTC.
It therefore makes no sense to keep this service enabled when using NTP.
The kernel has seemingly loaded the time from the RTC at bootup for a
very long time. [2]
Manual `hwclock --hctosys` was removed in #165684.

This all seem to make manual RTC fiddling redundant.
My Arch systems don't do it and they've never had any trouble keeping
the time.

The only remaining raison d'être for this service is offline drift
compensation as documented in hwclock(8). [3]
This isn't implemented in NixOS, and the (unmaintained) tool [4] for
this isn't even packaged.
I don't think anyone is relying on this functionality, and it doesn't
seem right to only implement it partially rather than within a more
complete module.

One thing this service actually implemented, rather shakily, is
time.hardwareClockInLocalTime.
This can more reliably be achieved by creating /etc/adjtime directly.

[1]: 023f333a99
[2]: 0c86edc0d4
[3]: https://man.archlinux.org/man/hwclock.8#Keeping_Time_without_External_Synchronization
[4]: https://github.com/rogers0/adjtimex
2026-02-26 00:21:10 +02:00
cyclopentane
9ddcf0365c nixos/treewide: replace boot.initrd.secrets with boot.initrd.secretPaths 2026-02-24 21:38:41 +01:00
cyclopentane
21784300bd nixos/initrd: mark boot.initrd.secrets as deprecated 2026-02-24 21:38:40 +01:00
cyclopentane
72e4df576e nixos/initrd: add secretPaths and extraSecretsHook 2026-02-24 21:38:40 +01:00
Jamie Magee
d446c73c0a nixos/systemd: convert sleep.extraConfig to RFC42-style settings
Replace the stringly-typed systemd.sleep.extraConfig option (types.lines)
with systemd.sleep.settings.Sleep, a freeformType submodule using
types.attrsOf unitOption. This follows the same pattern already used by
systemd.settings.Manager, services.logind.settings.Login, and other
systemd modules that have been migrated to RFC42.

The sleep.conf file is now rendered via settingsToSections instead of raw
string interpolation.

A mkRemovedOptionModule is added for the old option path to give users a
clear migration message.
2026-02-22 21:55:03 -08:00
nikstur
ba8e154742 nixos/systemd: point various systemd daemons to /etc/static
This is done to prepare the removal of
0006-hostnamed-localed-timedated-disable-methods-that-cha.patch from
systemd.

Pointing the daemon to /etc/static will make imperative changes to these
files (e.g. via hostnamectl) fail because systemd cannot edit them.
2026-02-20 19:15:11 +01:00
nikstur
0f9f91c486 nixos-init: extend PATH with config instead of overriding (#491409) 2026-02-18 09:28:27 +00:00
dram
afb55187d6 nixos/clevis: Fix executable names for extraUtilsCommands ; Add back curl to extraBin (#491314) 2026-02-18 05:17:07 +00:00
Tert0
26dbb73c9d nixos/systemd/tpm2: add pcrphase services 2026-02-18 00:15:40 +01:00
nikstur
e2b96c6c4e nixos/systemd: re-add openssh to manager PATH
Otherwise systemd-ssh-generator doesn't work.

This can only be removed once
0013-inherit-systemd-environment-when-calling-generators.patch is
dropped.
2026-02-17 23:04:53 +01:00
dramforever
d2423a46ee nixos/clevis: Add back curl to extraBin
This partially reverts #382585, and fixes #490395.
2026-02-17 15:25:18 +08:00
dramforever
dd63c33eef nixos/clevis: Fix executable names for extraUtilsCommands 2026-02-17 15:22:54 +08:00