nixos/systemd: introduce settingsToSections util, migrate existing rfc42 options to use settingsToSections, migrate oomd to rfc42 (#437477)

This commit is contained in:
Will Fancher
2025-09-12 03:41:59 +00:00
committed by GitHub
5 changed files with 50 additions and 61 deletions

View File

@@ -22,7 +22,7 @@ let
timerToUnit
mountToUnit
automountToUnit
attrsToSection
settingsToSections
;
cfg = config.boot.initrd.systemd;
@@ -484,10 +484,7 @@ in
"/init".source = "${cfg.package}/lib/systemd/systemd";
"/etc/systemd/system".source = stage1Units;
"/etc/systemd/system.conf".text = ''
[Manager]
${attrsToSection cfg.settings.Manager}
'';
"/etc/systemd/system.conf".text = settingsToSections cfg.settings;
# We can use either ! or * to lock the root account in the
# console, but some software like OpenSSH won't even allow you