Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Don't include networkd units unless enabled

Otherwise, the enabled -> disabled transition won't be handled
correctly (switch-to-configuration currently assumes that if a unit is
running and exists, it should be restarted).

+7 -6
+3
nixos/modules/system/boot/networkd.nix
··· 624 624 625 625 config = mkIf config.systemd.network.enable { 626 626 627 + systemd.additionalUpstreamSystemUnits = 628 + [ "systemd-networkd.service" "systemd-networkd-wait-online.service" ]; 629 + 627 630 systemd.network.units = 628 631 mapAttrs' (n: v: nameValuePair "${n}.link" (linkToUnit n v)) cfg.links 629 632 // mapAttrs' (n: v: nameValuePair "${n}.netdev" (netdevToUnit n v)) cfg.netdevs
+2
nixos/modules/system/boot/resolved.nix
··· 18 18 19 19 config = mkIf config.services.resolved.enable { 20 20 21 + systemd.additionalUpstreamSystemUnits = [ "systemd-resolved.service" ]; 22 + 21 23 systemd.services.systemd-resolved = { 22 24 wantedBy = [ "multi-user.target" ]; 23 25 restartTriggers = [ config.environment.etc."systemd/resolved.conf".source ];
-6
nixos/modules/system/boot/systemd.nix
··· 97 97 "systemd-modules-load.service" 98 98 "kmod-static-nodes.service" 99 99 100 - # Networking 101 - "systemd-networkd.service" 102 - "systemd-networkd-wait-online.service" 103 - "systemd-resolved.service" 104 - "systemd-timesyncd.service" 105 - 106 100 # Filesystems. 107 101 "systemd-fsck@.service" 108 102 "systemd-fsck-root.service"
+2
nixos/modules/system/boot/timesyncd.nix
··· 18 18 19 19 config = mkIf config.services.timesyncd.enable { 20 20 21 + systemd.additionalUpstreamSystemUnits = [ "systemd-timesyncd.service" ]; 22 + 21 23 systemd.services.systemd-timesyncd = { 22 24 wantedBy = [ "sysinit.target" ]; 23 25 restartTriggers = [ config.environment.etc."systemd/timesyncd.conf".source ];