Unverified Commit f9e70759 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #213816 from karmanyaahm/karmanyaahm/nixos/kubo

parents 2fb1fcd5 6086d857
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -334,6 +334,8 @@ In addition to numerous new and upgraded packages, this release has the followin
    [headscale's example configuration](https://github.com/juanfont/headscale/blob/main/config-example.yaml)
    can be directly written as attribute-set in Nix within this option.

- `services.kubo` now unmounts `ipfsMountDir` and `ipnsMountDir` even if it is killed unexpectedly when 'autoMount` is enabled.

- `nixos/lib/make-disk-image.nix` can now mutate EFI variables, run user-provided EFI firmware or variable templates. This is now extensively documented in the NixOS manual.

- `services.grafana` listens only on localhost by default again. This was changed to upstreams default of `0.0.0.0` by accident in the freeform setting conversion.
+4 −0
Original line number Diff line number Diff line
@@ -319,6 +319,10 @@ in
          # change when the changes are applied. Whyyyyyy.....
          ipfs --offline config replace -
      '';
      postStop = mkIf cfg.autoMount ''
        # After an unclean shutdown the fuse mounts at cfg.ipnsMountDir and cfg.ipfsMountDir are locked
        umount --quiet '${cfg.ipnsMountDir}' '${cfg.ipfsMountDir}' || true
      '';
      serviceConfig = {
        ExecStart = [ "" "${cfg.package}/bin/ipfs daemon ${kuboFlags}" ];
        User = cfg.user;
+13 −5
Original line number Diff line number Diff line
@@ -50,12 +50,20 @@ import ./make-test-python.nix ({ pkgs, ...} : {
    machine.succeed("test ! -e /var/lib/ipfs/")

    # Test FUSE mountpoint
    # The FUSE mount functionality is broken as of v0.13.0 and v0.17.0.
    # See https://github.com/ipfs/kubo/issues/9044.
    # Workaround: using CID Version 1 avoids that.
    ipfs_hash = fuse.succeed(
        "echo fnord3 | ipfs --api /ip4/127.0.0.1/tcp/2324 add --quieter"
    )
        "echo fnord3 | ipfs --api /ip4/127.0.0.1/tcp/2324 add --quieter --cid-version=1"
    ).strip()

    # The FUSE mount functionality is broken as of v0.13.0.
    # See https://github.com/ipfs/kubo/issues/9044.
    # fuse.succeed(f"cat /ipfs/{ipfs_hash.strip()} | grep fnord3")
    fuse.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3")

    # Force Kubo to crash and wait for it to restart
    # Tests the unmounting of /ipns and /ipfs
    fuse.systemctl("kill --signal=SIGKILL ipfs.service")
    fuse.wait_for_unit("ipfs.service", timeout = 30)

    fuse.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3")
  '';
})