Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 2fc097ad74d8
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 1c4480e9318f
Choose a head ref
  • 8 commits
  • 3 files changed
  • 3 contributors

Commits on Jun 11, 2020

  1. Copy the full SHA
    c8a2e63 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    74ff433 View commit details
    Browse the repository at this point in the history
  3. nixos/ipfs: consolidate services into one ipfs.service

    Previously we had three services for different config flavors. This is
    confusing because only one instance of IPFS can run on a host / port
    combination at once. So move all into ipfs.service, which contains the
    configuration specified in services.ipfs.
    
    Also remove the env wrapper and just use systemd env configuration.
    matthewbauer committed Jun 11, 2020
    Copy the full SHA
    c5f4019 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2020

  1. nixos/ipfs: add startWhenNeeded option

    This makes it possible to only start IPFS when needed. So a user’s
    IPFS daemon only starts when they actually use it.
    
    A few important warnings though:
    
      - This probably shouldn’t be mixed with services.ipfs.autoMount
        since you want /ipfs and /ipns aren’t activated like this
      - ipfs.socket assumes that you are using ports 5001 and 8080 for the
        API and gateway respectively. We could do some parsing to figure
        out what is in apiAddress and gatewayAddress, but that’s kind of
        difficult given the nonstandard address format.
      - Apparently? this doesn’t work with the --api commands used in the tests.
    
    Of course you can always start automatically with startWhenNeeded =
    false, or just running ‘systemctl start ipfs.service’.
    
    Tested with the following test (modified from tests/ipfs.nix):
    
      import ./make-test-python.nix ({ pkgs, ...} : {
        name = "ipfs";
    
        nodes.machine = { ... }: {
          services.ipfs = {
            enable = true;
            startWhenNeeded = true;
          };
        };
    
        testScript = ''
          start_all()
    
          machine.wait_until_succeeds("ipfs id")
          ipfs_hash = machine.succeed("echo fnord | ipfs add | awk '{ print $2 }'")
    
          machine.succeed(f"ipfs cat /ipfs/{ipfs_hash.strip()} | grep fnord")
        '';
      })
    
    Fixes #90145
    
    Update nixos/modules/services/network-filesystems/ipfs.nix
    
    Co-authored-by: Florian Klink <flokli@flokli.de>
    matthewbauer and flokli committed Jun 12, 2020
    Copy the full SHA
    b36ef70 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    fa06d8f View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    982a17a View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    2c2f6c0 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #90157 from obsidiansystems/socket-based-ipfs

    Add socket-based IPFS support
    Ericson2314 committed Jun 12, 2020
    Copy the full SHA
    1c4480e View commit details
    Browse the repository at this point in the history