Replace `systemd.user.extraConfig` with a freeform `systemd.user.settings.Manager` submodule, rendered via `utils.systemdUtils.lib.settingsToSections`. `extraConfig` is removed via `mkRemovedOptionModule`. Mirrors the existing `systemd.settings.Manager` migration of the system-side manager.
Updates the two in-tree consumers (`nixos/modules/testing/test-instrumentation.nix` and `nixos/tests/systemd.nix`) to the new option.
Adds `nixos/tests/systemd-user-settings` to assert the rendered `user.conf` contents.
Drop the `with utils;`, `with systemdUtils.unitOptions;` and `with lib;` blocks and qualify all references with `lib.`, `utils.systemdUtils.lib.` and `utils.systemdUtils.types.` instead. No behavioural change.
Prefix `lib.` on `mkOption`, `mkIf`, `types.*`, `literalExpression`, `optionalString` and `concatStringsSep` so the module no longer relies on `with lib;`. No behavioural change.
`pkgs.glibcLocales` is null for musl systems, so
`options.i18n.glibcLocales` needs to also be nullable.
otherwise, the `.override` and subsequence path interpolations
fail for non-gnu systems.
Replace the free-form `systemd.coredump.extraConfig` option with a structured `systemd.coredump.settings.Coredump` submodule rendered via `utils.systemdUtils.lib.settingsToSections`, in line with RFC 42. A `mkRemovedOptionModule` entry points existing users at the new option, and the systemd-coredump NixOS test now exercises the new settings option by asserting the rendered `coredump.conf` contents.
Fixes#353225
The value of `networking.resolvconf.enable` was previously
predicated on the existence `environment.etc."resolv.conf"`.
This could lead to infinite recursion when an attribute defined
within the resolvconf module was also required to define
`environment.etc` (see example below).
Instead, set the default to an explicit true and set the value to
false where required in-tree. This turns out to only be two places:
systemd-resolved and tetrd.
Example infrec (from building .#nixosTests.containers-hosts):
```
… while evaluating definitions from `/nix/store/5djjm1dipmdh82issrmpfjdplp7hk0pp-source/nixos/modules/services/logging/logrotate.nix':
… while evaluating the option `containers.netmask.services.logrotate.enable':
… while evaluating the option `containers.netmask.users.groups':
… while evaluating definitions from `/nix/store/5djjm1dipmdh82issrmpfjdplp7hk0pp-source/nixos/modules/config/resolvconf.nix':
… while evaluating the option `containers.netmask.networking.resolvconf.enable':
… while evaluating the option `containers.netmask.environment.etc':
… while evaluating definitions from `/nix/store/5djjm1dipmdh82issrmpfjdplp7hk0pp-source/nixos/modules/services/logging/logrotate.nix':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: infinite recursion encountered
at /nix/store/5djjm1dipmdh82issrmpfjdplp7hk0pp-source/lib/modules.nix:1512:13:
1511| _type = "if";
1512| inherit condition content;
| ^
1513| };
```
Allows running systemctl soft-reboot, to only reboot userspace not full reboot with the kernel included.
Signed-off-by: Hadi Chokr <hadichokr@icloud.com>