anchor.diff:  
         path  = [ pkgs.ipfs ];
   
  +      environment = pathEnv;
  +
         serviceConfig = {
           ExecStart = "${ipfs}/bin/ipfs daemon ${ipfsFlags} --offline";
           User = cfg.user;
  
positive.code: 
        path  = [ pkgs.ipfs ];
  
        serviceConfig = {
          ExecStart = "${ipfs}/bin/ipfs daemon ${ipfsFlags}";
          User = cfg.user;
  
negative.code: with lib;
  
  let
    inherit (pkgs) ipfs runCommand makeWrapper;
  
    cfg = config.services.ipfs;
  
    ipfsFlags = ''${if cfg.autoMigrate then "--migrate" else ""} ${if cfg.enableGC then "--enable-gc" else ""} ${toString cfg.extraFlags}'';
  
    pathEnv = { IPFS_PATH = cfg.dataDir; };
  
    # Wrapping the ipfs binary with the environment variable IPFS_PATH set to dataDir because we can't set it in the user environment
    wrapped = runCommand "ipfs" { buildInputs = [ makeWrapper ]; } ''
      mkdir -p "$out/bin"
      makeWrapper "${ipfs}/bin/ipfs" "$out/bin/ipfs" --set IPFS_PATH ${cfg.dataDir}
    '';
  in
  
  {
  