Commit c1ae82f4 authored by 5aaee9's avatar 5aaee9
Browse files

nixos/systemd: fix make unit failed when unit too large

parent 998720bf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -21,11 +21,12 @@ in rec {
        { preferLocalBuild = true;
          allowSubstitutes = false;
          inherit (unit) text;
          passAsFile = [ "text" ];
        }
        ''
          name=${shellEscape name}
          mkdir -p "$out/$(dirname -- "$name")"
          echo -n "$text" > "$out/$name"
          mv "$textPath" "$out/$name"
        ''
    else
      pkgs.runCommand "unit-${mkPathSafeName name}-disabled"