nixpkgs-gnunet/README.md

69 lines
2.2 KiB
Markdown
Raw Normal View History

2018-11-14 18:21:22 +01:00
# Nixpkgs overlay with GNUnet-related packages
2018-11-14 18:54:00 +01:00
This repository contains experimental packages related to [GNUnet](https://gnunet.org) for the [Nix package manager](https://nixos.org/nix). There exists a GNUnet package in the official nixpkgs repository but as GNUnet is still under heavy development, it is recommended to use a fairly recent version from the master branch of GNUnet's git repository.
2018-11-14 18:02:43 +01:00
2018-11-14 18:54:00 +01:00
Currently the overlay provides these packages:
- GNUnet itself
- libgnurl
2020-04-13 20:48:10 +02:00
## Installation of the GNUnet service (NixOS only)
2019-09-21 11:42:18 +02:00
On NixOS we can install this overlay system-wide and then enable the GNUnet service. This will install the *multi-user setup* as described in the [official documentation](https://docs.gnunet.org/handbook/gnunet.html#Installing-GNUnet). We have to add this to our ``/etc/nixos/configuration.nix``:
2018-11-14 18:02:43 +01:00
```
{ config, pkgs, ... }:
{
...
nixpkgs.overlays = [
2020-04-13 20:45:02 +02:00
(import (fetchGit https://code.ulrich.earth/christian/nixpkgs-gnunet.git))
2018-11-14 18:02:43 +01:00
];
2019-09-21 11:42:18 +02:00
services.gnunet = {
enable = true;
};
2018-11-14 18:02:43 +01:00
...
}
```
2019-09-21 11:42:18 +02:00
We can add options to the global GNUnet configuration file like this:
```
services.gnunet = {
enable = true;
extraOptions = ''
[NAT]
ENABLE_UPNP = NO
[FS]
IMMEDIATE_START = NO
'';
};
```
2019-09-21 11:43:25 +02:00
After running ``nixos-rebuild switch`` the GNUnet system services should be running (we still have to [start GNUnet per user](https://docs.gnunet.org/handbook/gnunet.html#Starting-GNUnet)):
2019-09-21 11:42:18 +02:00
```
$ touch ~/.config/gnunet.conf
$ gnunet-arm -s
```
2020-04-13 20:48:10 +02:00
## Installation of the GNUnet package into the user environment (Nix on all systems)
2019-09-21 11:42:18 +02:00
We can install the overlay into the user environment like this:
```shell
2020-04-13 20:45:02 +02:00
$ git clone https://code.ulrich.earth/christian/nixpkgs-gnunet.git
$ ln -s $(readlink -e nixpkgs-gnunet/default.nix) ~/.config/nixpkgs/overlays/nixpkgs-gnunet.nix
2019-09-21 11:42:18 +02:00
```
Now we can install the GNUnet package for our user. This will allow a *single-user setup* as described in the [official documentation](https://docs.gnunet.org/handbook/gnunet.html#Installing-GNUnet).
```shell
$ nix-env -f '<nixpkgs>' -iA gnunet
```
Now we can [start GNUnet](https://docs.gnunet.org/handbook/gnunet.html#Starting-GNUnet):
```
2020-04-13 20:49:45 +02:00
$ touch ~/.config/gnunet.conf
2020-04-13 20:45:02 +02:00
$ gnunet-arm -s
2019-09-21 11:42:18 +02:00
```