How to use GNUnet's GNU Name System (GNS) on NixOS?

I’ve used NixOS for a while now, but am not too familiar with how it handles services and I’m completely new to GNUnet.

I’d like to try out the GNU Name System (GNS) on my machine, which runs NixOS 19.03.

Thus, I’ve set these options in /etc/nixos/configuration.nix:

  services.gnunet.enable = true;
  services.gnunet.package = pkgs.gnunet_git;

… and rebuilt the system with that.

After that, the GNUnet command line commands seem indeed to be available (version v0.11.0 according to the output of running them with --version), but I’m unsure how to proceed. I guessed I should go through GNUnet, but I was unsure whether gnunet-arm -s to start the “automatic restart manager” would be required at all. (Isn’t starting services a task of the operating system? Is this already covered by services.gnunet.enable?) I’ve tried it anyway, expecting to maybe get an error message that services were already running or something, but I got:

Sep 05 10:42:29-785977 arm-3893 ERROR Could not access configuration file `/home/das-g/.config/gnunet.conf'
Sep 05 10:42:29-786061 util-disk-3893 ERROR `mkdir' failed on file `/build' at disk.c:798 with error: Permission denied
Sep 05 10:42:29-786076 arm-3893 ERROR `mkdir' failed on file `/build/gnunet-das-g-runtime//gnunet-service-arm.sock' at service.c:702 with error: Permission denied
Sep 05 10:42:29-786109 util-service-3893 ERROR `bind' failed at service.c:1108 with error: No such file or directory
Sep 05 10:42:29-786122 arm-3893 ERROR `bind' failed at service.c:1290 with error: Success
Sep 05 10:42:29-786132 arm-3893 ERROR Could not bind to any of the ports I was supposed to, refusing to run!

The first error was easy to solve with

touch ~/.config/gnunet.conf

Not quite sure why GNUnet doesn’t create that file automatically when it doesn’t yet exist, but installation instructions for other distributions mention that step, too.

But what about the rest? /build doesn’t sound like something any program should try to access at runtime and more like an artifact of the environment in which nixpkgs and nix build stuff.

And what the hell is error: Success supposed to mean?

But oh well, maybe that stuff is already running anyway. Let’s try to list the GNUnet services as instructed in

gnunet-arm -I

Well, that didn’t produce any output for me, it just hung indefinitely until I Ctrl+c’d it.

Same for


which apparently is supposed to show to what peers I’m connected.


which should apparently also show that information, hung without any output, too, and I wasn’t even able to terminate it with Ctrl+c. I had to pkill -9 gnunet-core from another terminal.

But what I wanted to try was GNUnet, so I now skipped forward to GNUnet and tried

gnunet-identity -C das-g

which also hung indefinitely without output until terminated by Ctrl+c.

So it seems that either I have no clue how to use this stuff even with the documentation or it just doesn’t work yet (or both). Can someone help me out?

Output of nix run nixpkgs.nix-info -c nix-info -m (click to expand)
  • system: "x86_64-linux"
  • host os: Linux 4.19.69, NixOS, 19.03.173426.541d9cce8af (Koi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.2.2
  • channels(root): "nixos-19.03.173426.541d9cce8af"
  • channels(das-g): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos


do you have some news concerning your post ?

Best regards

No, I didn’t pursue this further since back then.