Commit Graph
988657 Commits
Author SHA1 Message Date
r-vdp 5cc82c4922 switch-to-configuration-ng: handle user units migrating to NixOS
When a unit moves from ~/.config/systemd/user (e.g. home-manager) to
/etc/systemd/user, the first pass skips it because its FragmentPath
still points at the home directory. The per-user activation
(nixos-activation.service -> home-manager) then removes the home copy
and stops the unit, leaving the now-unmasked NixOS definition inactive
until the next login.

Record such units up front and run a second pass after
nixos-activation.service: daemon-reload, then find units that were
shadowed but now aren't anymore, start/restart them as needed, and
re-start active targets so any other newly-unmasked dependencies are
pulled in.
Units that remain shadowed by ~/.config are left alone.

The opposite direction (NixOS -> home-manager) already works: the first
pass stops the removed /etc unit and home-manager starts the new home copy.
2026-04-21 15:45:02 +02:00
r-vdp 106c49d2e4 nixos/tests/switch-test: cover user-unit restart on switch
Add a lingering test user plus specialisations covering stop-start,
stopIfChanged=false, reloadIfChanged, reloadTriggers, and removal for
systemd.user.services so the new user-scope diff/restart path in
switch-to-configuration-ng is exercised.
2026-04-21 15:44:15 +02:00
r-vdp 2ff37e40e0 switch-to-configuration-ng: restart changed user units on switch
Previously the per-user child only reexecuted the user systemd instance
and restarted nixos-activation.service, leaving NixOS-managed user units
in /etc/systemd/user running stale binaries until the next login. Options
like systemd.user.services.<name>.restartTriggers were ineffective.

The user-scope child now:

  1. collects changes by comparing the pre-switch old_toplevel (captured
     before activation and passed via OLD_TOPLEVEL env) against the new
     toplevel
  2. stops obsolete units
  3. reexecutes + reloads the user systemd
  4. reloads/restarts/starts changed units
  5. runs nixos-activation.service (home-manager etc.)

Units are filtered by FragmentPath so those shadowed by
~/.config/systemd/user are left to home-manager to handle.

Resume-after-interrupt persistence uses $XDG_RUNTIME_DIR/nixos for the
user scope, mirroring /run/nixos for system.

Fixes #246611
2026-04-21 15:43:44 +02:00
r-vdp 5e22ad20da switch-to-configuration-ng: parameterise unit handling over UnitScope
Introduce a UnitScope enum that abstracts the differences between
/etc/systemd/system and /etc/systemd/user (unit directory, persisted
action-list location) and thread it through handle_modified_unit() and
collect_unit_changes(). The system path is unchanged: all callers pass
UnitScope::System and the resulting unit directory and list-file paths
are identical to the previous constants.

Preparation to reuse the diff logic for user units.
2026-04-21 15:42:26 +02:00
r-vdp 5e4c815e26 switch-to-configuration-ng: extract unit comparison loop into helper
Move the inline loop that diffs active units against the new toplevel
into a free-standing collect_unit_changes(). No functional change,
preparation to reuse the same logic for user units.
2026-04-21 15:42:26 +02:00
nicknb eee031213a apko: 1.2.3 -> 1.2.4 2026-04-21 15:42:01 +02:00
jaredmontoya 8a6e8ebac6 passff-host: 1.2.4 -> 1.2.5 2026-04-21 15:39:58 +02:00
jaredmontoya ffb2278df4 passff-host: fix patches not working 2026-04-21 15:39:58 +02:00
R. Ryantm 8c3f0384d2 libretro.vice-x128: 0-unstable-2026-04-02 -> 0-unstable-2026-04-18 2026-04-21 13:30:26 +00:00
R. Ryantm de120248fc tomlc17: 260323 -> 260414 2026-04-21 13:26:48 +00:00
Paul MeyerandGitHub 4f959719ad imgproxy: 3.30.1 -> 3.31.2 (#502172) 2026-04-21 13:19:23 +00:00
Paul MeyerandGitHub e1c71bccd4 tf-summarize: 0.3.15 -> 0.3.20 (#502292) 2026-04-21 13:18:23 +00:00
Paul MeyerandGitHub 6e07557db1 dblab: 0.34.3 -> 0.38.0 (#502301) 2026-04-21 13:17:58 +00:00
Paul MeyerandGitHub 460f2b94a7 algolia-cli: 1.7.3 -> 1.8.2 (#502822) 2026-04-21 13:16:06 +00:00
Paul MeyerandGitHub b73e50769c dry: 0.11.2 -> 0.13.0 (#503142) 2026-04-21 13:15:26 +00:00
Paul MeyerandGitHub 412f8bfa9b go-jsonnet: 0.21.0 -> 0.22.0 (#503143) 2026-04-21 13:14:51 +00:00
Chris Moultrie 7582b98c85 forgejo-runner: 12.8.2 -> 12.9.0
changelog: https://code.forgejo.org/forgejo/runner/releases/tag/v12.9.0
2026-04-21 09:11:55 -04:00
Paul MeyerandGitHub 6e9c162210 aperture: 0.3-beta -> 0.5.0 (#503543) 2026-04-21 13:11:01 +00:00
mfukuba 5e41e0c468 ruby_4_0: 4.0.2 -> 4.0.3 2026-04-21 22:09:43 +09:00
Paul MeyerandGitHub 5360d47a69 hut: 0.7.0 -> 0.8.0 (#503910) 2026-04-21 13:08:59 +00:00
Paul MeyerandGitHub 4db81b1335 nextdns: 1.46.0 -> 1.47.2 (#503974) 2026-04-21 13:08:20 +00:00
Paul MeyerandGitHub 854160f28f sq: 0.48.12 -> 0.50.0 (#504531) 2026-04-21 13:07:27 +00:00
R. Ryantm 964cd433d3 libretro.ppsspp: 0-unstable-2026-03-31 -> 0-unstable-2026-04-20 2026-04-21 13:01:56 +00:00
Paul MeyerandGitHub 5aec72aae5 git-town: 22.7.0 -> 22.7.1 (#505059) 2026-04-21 13:01:51 +00:00
Paul MeyerandGitHub 49befa2b20 pinniped: 0.44.0 -> 0.45.0 (#505085) 2026-04-21 13:01:08 +00:00
Niklas KorzandGitHub 319dd26eaf nixos/jellyfin: fix unit: RequiresMountsFor for stateful directories (#505449) 2026-04-21 13:01:00 +00:00
Adam C. StephensandGitHub 94beaa0b67 mimir: 3.0.5 -> 3.0.6 (#511981) 2026-04-21 13:00:01 +00:00
Paul MeyerandGitHub d016d7c870 webtunnel: 0.0.3 -> 0.0.4 (#506601) 2026-04-21 12:59:54 +00:00
R. Ryantm 6f07baa4f1 cdncheck: 1.2.31 -> 1.2.32 2026-04-21 12:57:30 +00:00
Paul MeyerandGitHub f0c9f2a424 circumflex: 3.9 -> 4.0 (#506968) 2026-04-21 12:57:20 +00:00
Paul MeyerandGitHub 064d435dd5 terraform-docs: 0.21.0 -> 0.22.0 (#507693) 2026-04-21 12:56:40 +00:00
Paul MeyerandGitHub dda676e833 openfga: 1.13.1 -> 1.14.2 (#508001) 2026-04-21 12:56:07 +00:00
Paul MeyerandGitHub 11672f14a8 kubeone: 1.12.3 -> 1.13.4 (#508596) 2026-04-21 12:55:24 +00:00
R. Ryantm 639df78bbd volanta: 1.16.4 -> 1.17.2 2026-04-21 12:53:39 +00:00
Paul MeyerandGitHub a96addbd5c kargo: 1.9.5 -> 1.9.6 (#509792) 2026-04-21 12:53:14 +00:00
Paul MeyerandGitHub a2355af539 ovhcloud-cli: 0.10.0 -> 0.11.0 (#509855) 2026-04-21 12:51:24 +00:00
Cosima NeidahlandGitHub 23c4a73204 sc68: unstable-2022-11-24 -> 2.2.1-unstable-2024-09-09 (#510307) 2026-04-21 12:45:12 +00:00
Cosima NeidahlandGitHub e72a22c58b chiptrack: 0.5 -> 0.5-unstable-2026-02-09 (#510280) 2026-04-21 12:43:45 +00:00
R. Ryantm d782282436 crun: 1.27 -> 1.27.1 2026-04-21 12:42:01 +00:00
Cabia RangrisandGitHub 08ba90347a klipper: fix cross (#511549) 2026-04-21 12:41:24 +00:00
nixpkgs-ci[bot]andGitHub 7199e480c5 jsonschema-cli: 0.46.0 -> 0.46.2 (#512062) 2026-04-21 12:38:20 +00:00
Doron BeharandGitHub 0b664a0d63 tmux + mosh: enable utempter for musl builds (#511712) 2026-04-21 12:37:02 +00:00
R. Ryantm 1b3a1d2e31 python3Packages.ansible-core: 2.20.4 -> 2.20.5 2026-04-21 12:34:20 +00:00
Paul HaerleandGitHub 439d41bd09 xvfb: fix darwin build (#511235) 2026-04-21 12:31:45 +00:00
Paul HaerleandGitHub 2fc6362464 xinit: include launchd files when sandboxed (#511245) 2026-04-21 12:31:04 +00:00
Paul HaerleandGitHub 9312c55d31 xf86-{input,video}-*: remove darwin exclusions (#399650) 2026-04-21 12:30:26 +00:00
Paul HaerleandGitHub 38b0bb1ac0 python3Packages.nexusrpc: 1.3.0 -> 1.4.0, python3Packages.temporalio: 1.23.0 -> 1.25.0 (#509879) 2026-04-21 12:27:31 +00:00
R. Ryantm 0a3aa492cc upnp-router-control: 0.3.5 -> 0.3.6 2026-04-21 12:27:16 +00:00
Tom Herbers ef473a5248 xfr: 0.9.6 -> 0.9.9 2026-04-21 14:26:20 +02:00
whispers 2677f9eaa5 tor-browser: add whispersofthedawn as maintainer 2026-04-21 08:25:01 -04:00