summary refs log tree commit diff
path: root/nixos/modules/services/network-filesystems/ipfs.nix
Commit message (Collapse)AuthorAge
* kubo: rename from ipfsLuflosi2022-10-02
| | | | Go-IPFS was renamed to Kubo in version 0.14.0, see https://github.com/ipfs/kubo/issues/8959.
* nixos/*: automatically convert option descriptionspennae2022-08-31
| | | | | | | | | | | | conversions were done using https://github.com/pennae/nix-doc-munge using (probably) rev f34e145 running nix-doc-munge nixos/**/*.nix nix-doc-munge --import nixos/**/*.nix the tool ensures that only changes that could affect the generated manual *but don't* are committed, other changes require manual review and are discarded.
* treewide: automatically md-convert option descriptionspennae2022-07-30
| | | | | | | | | | | | | | | | | | | | | | the conversion procedure is simple: - find all things that look like options, ie calls to either `mkOption` or `lib.mkOption` that take an attrset. remember the attrset as the option - for all options, find a `description` attribute who's value is not a call to `mdDoc` or `lib.mdDoc` - textually convert the entire value of the attribute to MD with a few simple regexes (the set from mdize-module.sh) - if the change produced a change in the manual output, discard - if the change kept the manual unchanged, add some text to the description to make sure we've actually found an option. if the manual changes this time, keep the converted description this procedure converts 80% of nixos options to markdown. around 2000 options remain to be inspected, but most of those fail the "does not change the manual output check": currently the MD conversion process does not faithfully convert docbook tags like <code> and <package>, so any option using such tags will not be converted at all.
* Merge pull request #166340 from max-privatevoid/patch-6Artturi2022-06-28
|\
| * nixos/ipfs: Only set ReadWritePaths when hardenedMax2022-04-16
| | | | | | | | Co-authored-by: Luflosi <Luflosi@users.noreply.github.com>
* | nixos/ipfs: do not leak config to journal on startupMax2022-06-17
| | | | | | | | | | | | | | The preStart script for the IPFS service will print parts of the configuration to stdout (and therefore, the journal) when applying profiles on startup. This may lead to unwanted disclosure of private information, such as remote pinning service API keys. Fix by sending stdout to /dev/null.
* | nixos/ipfs: fix the services.ipfs.autoMigrate optionLuflosi2022-04-16
| | | | | | | | | | | | Apparently this was never properly tested and never worked. When the IPFS repo needs upgrading, the first call to ipfs, which is run before running the migration, fails with the error message "Error: ipfs repo needs migration". To fix this, simply run the migration before any `ipfs config` calls but don't run it when `dataDir` is empty and we need to call `ipfs init`. Writing a NixOS test for this would require keeping at least two versions of IPFS in Nixpkgs, which we don't currently do.
* | nixos/ipfs: add Luflosi as maintainerLuflosi2022-04-16
| |
* | nixos/ipfs: remove unused codeLuflosi2022-04-16
| | | | | | | | This code became obsolete with 4044d81d5cea617e58ec9682f9cc447dde326850, just a couple days after it was introduced.
* | Merge pull request #165259 from Luflosi/ipfs-recursiveUpdateRobert Hensing2022-04-05
|\ \ | |/ |/| nixos/ipfs: use lib.recursiveUpdate instead of // operator
| * nixos/ipfs: use lib.recursiveUpdate instead of // operatorLuflosi2022-03-22
| | | | | | | | Use `recursiveUpdate` instead of the // operator, as recommended in https://nix.dev/anti-patterns/language#attr1-attr2-merge-operator. Without this change, setting `services.ipfs.extraConfig.Addresses.NoAnnounce` for example will cause `services.ipfs.apiAddress`, `services.ipfs.gatewayAddress` and `services.ipfs.swarmAddress` to be ignored.
* | nixos/ipfs: improve how the commandline flags are generatedLuflosi2022-03-24
| | | | | | | | | | | | Use `utils.escapeSystemdExecArgs` instead of relying on the exact way in which `toString` formats a list. In https://github.com/NixOS/nixpkgs/pull/156706#discussion_r795867283 a suggestion was made and then implemented to replace `toString` with `concatStringsSep " "`. @pennae then suggested to use `utils.escapeSystemdExecArgs` instead in https://github.com/NixOS/nixpkgs/pull/164846#issuecomment-1073001848.
* | nixos/ipfs: add systemd hardeningLuflosi2022-03-22
|/ | | | Use the hardened systemd unit from upstream.
* ipfs-migrator: 1.7.1 -> 2.0.2Luflosi2022-02-25
| | | | | | | | | | | | | | | | | | | | https://github.com/ipfs/fs-repo-migrations/releases/tag/v2.0.2 This is pretty much a complete rewrite of the ipfs-migrator package. In version 2.0.0 a major change was made to the way the migrator works. Before, there was one binary that contained every migration. Now every migration has its own binary. If fs-repo-migrations can't find a required binary in the PATH, it will download it off the internet. To prevent that, build every migration individually, symlink them all into one package and then wrap fs-repo-migrations so it finds the package with all the migrations. The change to the IPFS NixOS module and the IPFS package is needed because without explicitly specifying a repo version to migrate to, fs-repo-migrations will query the internet to find the latest version. This fails in the sandbox, for example when testing the ipfs passthru tests. While it may seem like the repoVersion and IPFS version are in sync and the code could be simplified, this is not the case. See https://github.com/ipfs/fs-repo-migrations#when-should-i-migrate for a table with the IPFS versions and corresponding repo versions. Go 1.17 breaks the migrations, so use Go 1.16 instead. This is also the Go version used in their CI, see https://github.com/ipfs/fs-repo-migrations/blob/3dc218e3006adac25e1cb5e969d7c9d961f15ddd/.github/workflows/test.yml#L4. See https://github.com/ipfs/fs-repo-migrations/pull/140#issuecomment-982715907 for a previous mention of this issue. The issue manifests itself when doing anything with a migration, for example `fs-repo-11-to-12 --help`: ``` panic: qtls.ClientHelloInfo doesn't match goroutine 1 [running]: github.com/marten-seemann/qtls-go1-15.init.0() github.com/marten-seemann/qtls-go1-15@v0.1.1/unsafe.go:20 +0x132 ``` Also add myself as a maintainer for this package. This fixes the test failure discovered in https://github.com/NixOS/nixpkgs/pull/160914. See https://github.com/ipfs/fs-repo-migrations/issues/148 to read some of my struggles with updating this package.
* nixos/ipfs: use ipfs config replaceschnusch2022-02-06
|
* nixos/*: add trivial defaultText for options with simple defaultspennae2021-12-02
|
* nixos/doc: clean up defaults and examplesNaïm Favier2021-10-04
|
* Merge pull request #137113 from kevincox/ipfs-profile-fixKevin Cox2021-09-10
|\ | | | | nixos.ipfs: Fix startup after unclean shutdown.
| * nixos.ipfs: Fix startup after unclean shutdown.Kevin Cox2021-09-08
| | | | | | | | Fixes https://github.com/NixOS/nixpkgs/issues/135684
* | ipfs: default to not listen on the local networkhappysalada2021-09-10
|/
* Merge pull request #136261 from happysalada/ipfs_auto_migrationsKevin Cox2021-08-31
|\ | | | | Ipfs auto migrations
| * ipfs: add autoMigrate optionhappysalada2021-08-31
| |
| * ipfs: nixpkgs-fmthappysalada2021-08-31
| |
* | ipfs: increase UDP buffer sizehappysalada2021-08-31
| |
* | ipfs: nixpkgs-fmthappysalada2021-08-31
|/
* nixos/ipfs: run profile applications offlineMax2021-08-30
|
* nixos/ipfs: replace deprecated command line optionLuflosi2021-06-30
| | | | According to https://docs.ipfs.io/reference/cli/#ipfs the --local command line option is deprecated and should be replaced with --offline.
* nixos/ipfs: remove separate ipfs-init systemd unitLuflosi2021-04-22
| | | | There is no need for a separate unit. Simplify the NixOS module by adding the shell code to preStart of the main unit, where the other initialization code already is.
* nixos/ipfs: fix typo in commentLuflosi2021-04-21
| | | | This typo was introduced in 4044d81d5cea617e58ec9682f9cc447dde326850.
* nixos/modules/services/network-filesystems/ipfs: refactorFabián Heredia Montiel2020-11-03
| | | | Add `package` option to change the package used for the service.
* nixos/ipfs: Allow QUIC connections to socket activate tooJohn Ericson2020-08-11
| | | | | Well, via the underlying UDP. QUIC-level socket activation we'll get someday.
* nixos/ipfs: add QUIC transport to swarmAddress listLuflosi2020-08-08
| | | | According to https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#addressesswarm, the default list of swarm multiaddrs now includes the QUIC transport.
* IPFS NixOS module: Socket unit file more preciseJohn Ericson2020-06-17
| | | | | | | | | The systemd socket unit files now more precisely track the IPFS configuration, by including any multaddr they can make a `ListenStream` for. (The daemon doesn't currently support anything which would use `ListDatagram`, so we don't need to worry about that.) The tests use some of these features.
* nixos/ipfs: only set listenstream when gateway/api is defaultMatthew Bauer2020-06-12
|
* nixos/ipfs: always expose socketsMatthew Bauer2020-06-12
|
* nixos/ipfs: actually use upstream systemd unitsMatthew Bauer2020-06-12
|
* nixos/ipfs: add startWhenNeeded optionMatthew Bauer2020-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* nixos/ipfs: consolidate services into one ipfs.serviceMatthew Bauer2020-06-11
| | | | | | | | | 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.
* nixos/ipfs: remove unused auto migrate featureMatthew Bauer2020-06-11
|
* Services,IPFS,Fix: Require the ipfs-migrator package for handling upgrades.Dietrich Daroch2020-05-13
| | | | Without it, the services get stuck on startup when the IPFS repo needs upgrades.
* ipfs: remove ipfs repo fsckNathan Fish2020-05-05
| | | | https://github.com/NixOS/nixpkgs/pull/86242#issuecomment-621469759
* nixos: remove dependencies on local-fs.targetFlorian Klink2019-09-01
| | | | | | | Since https://github.com/NixOS/nixpkgs/pull/61321, local-fs.target is part of sysinit.target again, meaning units without DefaultDependencies=no will automatically depend on it, and the manual set dependencies can be dropped.
* nixos/fuse: initMichael Weiss2019-08-11
| | | | | Add a module for /etc/fuse.conf. Fixes #30923.
* nixos/ipfs: replace deprecated usage of PermissionsStartOnlyAaron Andersen2019-04-13
| | | | see https://github.com/NixOS/nixpkgs/issues/53852
* nixos: add preferLocalBuild=true; on derivations for config filesSymphorien Gibol2019-02-22
|
* Add IPFS warningEmery Hemingway2018-12-22
|
* Revert "nixos: rename system.{stateVersion,defaultChannel} -> system.nixos.\1"Tuomas Tynkkynen2018-07-28
| | | | | | | | | | | This reverts commit 095fe5b43def40279a243e663c662b02caac5318. Pointless renames considered harmful. All they do is force people to spend extra work updating their configs for no benefit, and hindering the ability to switch between unstable and stable versions of NixOS. Like, what was the value of having the "nixos." there? I mean, by definition anything in a NixOS module has something to do with NixOS...
* nixos/modules: users.(extraUsers|extraGroup->users|group)Florian Klink2018-06-30
|
* nixos/ipfs: Improve behavior of localDiscovery optionSebastian Jordan2018-05-23
| | | | | It is no longer required to change the config your ipfs repo manually if you change localDiscovery option in nixos configuration after ipfs repository initialization.
* nixos/ipfs: Add option to disable local port scanning for ipfs daemonSebastian Jordan2018-05-21
|