Unverified Commit 9b20e22b authored by nikstur's avatar nikstur Committed by GitHub
Browse files

Merge pull request #262573 from ElvishJerricco/systemd-repart-stage-1-assertion

nixos/systemd-repart: Add assertion requiring systemd in initrd
parents 501b1e35 b57c8507
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -74,6 +74,15 @@ in
  };

  config = lib.mkIf (cfg.enable || initrdCfg.enable) {
    assertions = [
      {
        assertion = initrdCfg.enable -> config.boot.initrd.systemd.enable;
        message = ''
          'boot.initrd.systemd.repart.enable' requires 'boot.initrd.systemd.enable' to be enabled.
        '';
      }
    ];

    boot.initrd.systemd = lib.mkIf initrdCfg.enable {
      additionalUpstreamUnits = [
        "systemd-repart.service"