3170 Commits

Author SHA1 Message Date
Martin Weinelt 9351f979e0 nixos/resolved: apply transformations to keys within resolved section (#535649) 2026-07-23 01:00:19 +00:00
nixpkgs-ci[bot] 866d350c81 Merge master into staging-nixos 2026-07-17 00:33:21 +00:00
nikstur 412c6fbc6e nixos/systemd/tpm2: add systemd-pcrlogin@.service (#541382) 2026-07-16 21:47:04 +00:00
Nick Cao 23171017c7 nixos/plymouth: add showDelay option (#532392) 2026-07-16 19:23:35 +00:00
nikstur 974b31ae59 nixos/systemd/fido2: add libpcsclite_real.so.1 to initrd (#541383) 2026-07-16 19:09:11 +00:00
phanirithvij 4abe0c81a7 various: replace deprecated os.system with subprocess calls
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
2026-07-13 16:27:07 +05:30
r-vdp 503bfeb10f nixos/systemd/fido2: add libpcsclite_real.so.1 to initrd
libfido2 links against pcsclite's libpcsclite.so.1, which since
pcsclite 2.3.1 is a shim that dlopens libpcsclite_real.so.1. nixpkgs
patches that dlopen to an absolute store path. make-initrd-ng only
follows DT_NEEDED, so the real library never ends up in the initrd.

systemd-cryptsetup then logs at boot:

  loading ".../pcsclite-2.4.1-lib/lib/libpcsclite_real.so.1" failed:
  cannot open shared object file: No such file or directory

and FIDO2 tokens behind PC/SC (NFC readers) cannot be used to unlock
LUKS in stage 1. Add the real library to the initrd store paths.
2026-07-13 12:54:41 +02:00
r-vdp 74abe2fea2 nixos/systemd/tpm2: add systemd-pcrlogin@.service
systemd v261 added systemd-pcrlogin@.service, which logind starts on
first login of a user to measure the user record into the 'login'
NvPCR. NixOS does not install the unit, so every first login logs:

  systemd-logind: Failed to start user measurement service
  'systemd-pcrlogin@1000.service', ignoring: Unit not found.

Install the unit on systems with systemd.tpm2.enable. The unit has ConditionSecurity=measured-os and does nothing elsewhere.
2026-07-13 12:54:32 +02:00
Florian Klink 22ef2ba154 nixos/limine: fix location for boot.loader.limine.additionalFiles
The documentation describes this as a set of files copied to /boot, with
the attribute name denoting the destination file name in /boot.

This uses essentially the same description as refind, systemd-boot and
grub. However limine put it into limine_install_dir (/boot/limine by
default) by accident, which broke downstream users.

For example, nixos-apple-silicon uses boot.loader.limine.additionalFiles
(and similar directives for other bootloaders) to update its m1n1
bootloader (which chainloads into u-boot, which chainloads into the
bootloader selected in NixOS), and due to this bug, put new versions of
it in the wrong location, effectively never updating m1n1.

Fix this, by updating the location. The next commit adds a regression VM
test for it.
2026-07-07 23:14:45 +03:00
r-vdp bb258c2dbe nixos/systemd-boot: update via Varlink instead of parsing bootctl status
systemd v261 lists the new systemd-boot-fallback binary in `bootctl
status`, so our regex picked up the older fallback version and ran
`bootctl update` on an already current ESP, which then exits non-zero.

Switch from parsing the `bootctl --status` output to having bootctl
compare versions itself by calling io.systemd.BootControl.Install over
Varlink. bootctl is spawned as a stdio Varlink server so that we always
use the bootctl from the target closure. An already current binary comes
back as an io.systemd.System error carrying ESTALE, which we treat as
success.
2026-07-01 12:08:51 +02:00
Martin Weinelt 66353ca989 nixos/resolved: apply transformations to keys within resolved section
Because all options are below the [Resolve] section, and we nest them as
such below `settings.Resolve` we need to apply the transformations one
level down for it to match the relevant keys.
2026-06-26 15:06:21 +02:00
nixpkgs-ci[bot] 081f72db10 Merge master into staging-nixos 2026-06-26 12:46:27 +00:00
Florian Klink d2bde3cf5a Allow to pass extra initrd archives to the bootloader (#534265) 2026-06-26 10:46:37 +00:00
r-vdp 5f267f4dda nixos/boot: allow passing extra initrd archives to the bootloader
This is for instance useful on Asahi where an additional initrd archive
containing firmware blobs and per-device calibration files is placed
on the ESP and updated by the Asahi Linux Installer.
These need to be loaded alongside the NixOS initrd.

Implemented for systemd-boot and Limine. Grub is left out since its
install script does not use bootspec yet.

Co-authored-by: Florian Klink <flokli@flokli.de>
2026-06-26 13:39:08 +03:00
r-vdp 5640e1f935 nixos/limine: add extraInstallCommands option
Allows running additional shell commands after the limine install script
generates menu entries, mirroring the systemd-boot option of the same
name.

Co-authored-by: Florian Klink <flokli@flokli.de>
2026-06-25 22:58:22 +02:00
nixpkgs-ci[bot] 68cd6bba16 Merge master into staging-nixos 2026-06-25 18:47:24 +00:00
nixpkgs-ci[bot] 42814ad4b8 Merge master into staging-next 2026-06-25 18:46:06 +00:00
Arian van Putten 37d4094e73 nixos/systemd/tmpfiles: add credstore.conf (#534998) 2026-06-25 16:23:49 +00:00
Arian van Putten 921383b2ce nixos/journald-{gateway,remote}: remove TLS support
We aren't linking systemd to gnutls anymore so these options
were all silently ignored. Which is pretty bad!

Assisted-by: Claude <noreply@anthropic.com>
2026-06-25 15:47:45 +02:00
Arian van Putten 3d47d8331a nixos/systemd: add many Varlink APIs since v260 (#533730) 2026-06-25 08:06:37 +00:00
Raito Bezarius 588eb06fcc nixos/systemd/tpm2/pcrextend: add Varlink API
This adds io.systemd.PCRExtend if the system has TPM2
enabled.

Additionally, this requires the system to fullfill
ConditionSecurity=measured-uki.

Change-Id: I3f1046cdc7463f3b6d3205030f7f12ac95e5cd9e
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-25 09:50:39 +02:00
Raito Bezarius 13684b8470 nixos/systemd/resolved: add Varlink APIs
This adds:

- /run/systemd/resolve/io.systemd.Resolve (resolution)
- /run/systemd/resolve/io.systemd.Resolve.Monitor (monitoring)

Change-Id: I43f22be5c42757f3dad1e4a9d209b0a91f404a55
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-25 09:50:38 +02:00
Raito Bezarius 5c6a1e2b3d nixos/systemd/udevd: add Varlink API
This adds io.systemd.Udev by default.

Change-Id: I41fec3831049aec03041a9ac8a282088e1773b79
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-25 09:50:38 +02:00
Raito Bezarius 04f7553ac2 nixos/systemd/networkd: add Varlink APIs
This adds:

- /run/systemd/resolve.hook/io.systemd.Network (DNS hook)
- /run/systemd/report/io.systemd.Network (metrics)
- /run/systemd/netif/io.systemd.Network (management)

Change-Id: I3d63b0723ae5f8f9496418d8f5d857809302155e
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-25 09:50:38 +02:00
Raito Bezarius b8b65f1616 nixos/systemd/factory-reset: add Varlink API
This adds io.systemd.FactoryReset by default.

Change-Id: I2ef8ae8812e76bc81a5f962e9bfeb99967f6df83
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-25 09:50:38 +02:00
Raito Bezarius 65cdcfc133 nixos/systemd/mute-console: add Varlink API
This adds io.systemd.MuteConsole by default.

Change-Id: I613d5f12e5b2742206c3023e4d57ccdfbaf0e704
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-25 09:50:38 +02:00
Raito Bezarius ff55fdd003 nixos/systemd/machined: add Varlink API
This adds io.systemd.Machine by default.

Change-Id: I05e595d22ad06504e2b3aacb48c74e7683057ce3
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-25 09:50:38 +02:00
Raito Bezarius 3003651b5a nixos/systemd/importd: add Varlink API
This adds io.systemd.Import by default.

Change-Id: Idad216f83af2f3402b864a162373f04968725b7b
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-25 09:50:38 +02:00
Raito Bezarius 7dacd14feb nixos/systemd/ask-password: add Varlink API
This adds io.systemd.AskPassword Varlink API by default.

Change-Id: I45b9a53d489ec3ea5561006c9c91ccb7016b3ee1
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-25 09:50:38 +02:00
Raito Bezarius 1fc433dc51 nixos/systemd/repart: add Varlink socket
This enables the ability to use systemd-repart over Varlink at
/run/systemd/io.systemd.Repart.

Change-Id: Ia74fdf8c2cbc4ec52994ba8ceb5796acc731abd3
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-25 09:50:38 +02:00
nixpkgs-ci[bot] a3eab19ade Merge master into staging-nixos 2026-06-25 00:46:31 +00:00
nixpkgs-ci[bot] 7ac2687f5f Merge master into staging-next 2026-06-25 00:45:19 +00:00
Raito Bezarius 6a63a4ad8b pkgs/*: drop maintenanceship of various packages
I have effectively renounced on maintaining all these packages and I do
not plan to return them except if I'm forced to.

I am also fine with most of these packages being dropped for next
releases if no maintainer shows up.

Change-Id: I8d167c8029b6991181bd7a094af21c3313af2b51
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2026-06-24 20:34:45 +02:00
Arian van Putten 8651ab7d4d nixos/systemd/tmpfiles: add credstore.conf
This creates the /{etc,run}/credstore{,.encrypted} directories
from which ImportCredential= picks up credentials
2026-06-24 18:20:31 +02:00
Vladimír Čunát 105327541b Reapply "staging-nixos merge for 2026-06-19" (#534864)
This reverts commit 532f984da0, reversing
changes made to 421ceaeef8.
2026-06-24 12:17:06 +02:00
Vladimír Čunát a6c3b1d396 Merge master into staging-nixos 2026-06-24 12:16:37 +02:00
Vladimír Čunát 6e628a4f79 Revert "staging-nixos merge for 2026-06-19" 2026-06-24 10:55:53 +02:00
nixpkgs-ci[bot] 5c3bf48741 Merge master into staging-nixos 2026-06-23 12:59:56 +00:00
nikstur efd34ae45a nixos/uki: use config systemd package (#530536) 2026-06-23 12:36:04 +00:00
r-vdp b3a73f17ba nixos/limine: format the install script 2026-06-22 16:21:35 +02:00
Will Fancher d54bf2afa2 nixos/systemd-initrd: add systemd.*.services.path to initrd store (#462515) 2026-06-20 03:42:37 +00:00
Will Fancher f446ff996a nixos/luksroot: Clarify preLVM with systemd stage 1 (#532037) 2026-06-19 22:23:42 +00:00
nixpkgs-ci[bot] b0682b66df Merge master into staging-nixos 2026-06-17 07:53:25 +00:00
Ramses 16122d6bd9 nixos/systemd-initrd: skip activation when init= is not a NixOS system (#532008) 2026-06-17 07:25:15 +00:00
Masum Reza 0c505d8bfa nixos/limine: fix secure boot key generation when using impermanence (#514762) 2026-06-17 04:57:48 +00:00
coolcuber 044b1b8fea nixos/plymouth: add showDelay option 2026-06-16 19:38:34 -04:00
Oskar Philipsson 2e23af70a8 nixos/systemd-initrd: add systemd.*.services.path to initrd store 2026-06-16 01:15:07 +02:00
Adam C. Stephens bed020fc90 nixos/tzpfms: init (#517991) 2026-06-15 18:03:18 +00:00
Will Fancher 1bd486a330 nixos/luksroot: Clarify preLVM with systemd stage 1 2026-06-15 13:33:13 -04:00
Ilan Joselevich feaf19ea26 nixos/systemd-initrd: skip activation when init= is not a NixOS system
initrd-nixos-activation ran the closure's prepare-root unconditionally. For a
non-NixOS init= there is no prepare-root, so the service failed, and since
initrd-switch-root.service requires it, switch-root never ran and the machine
dropped to the emergency shell. This broke init=/bin/sh recovery, and microVMs
that serve /nix/store over virtiofs and boot an arbitrary binary as init=.

initrd-find-nixos-closure already detects this and writes a non-empty NEW_INIT
to /etc/switch-root.conf (empty for a NixOS init). Read it via the same
EnvironmentFile= initrd-switch-root uses and skip activation when it's set, so
a non-NixOS init= switch-roots into its target directly. The NixOS path is
unchanged.

Also add a test booting a non-NixOS init=. It uses a store path rather than
/bin/sh: a real root already has /bin/sh and an os-release, but a fresh test
root has neither, so the test uses a tmpfs root and writes os-release first.

Assisted-by: Claude:claude-opus-4-8
2026-06-15 19:28:19 +03:00