Skip to content

Commit

Permalink
nixos/mycelium: add mycelium binary to systemPackages
Browse files Browse the repository at this point in the history
It's now possible to invoke `mycelium {routes,peers} list`.
  • Loading branch information
flokli committed Jun 8, 2024
1 parent 9a4cd7c commit 6a3a382
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nixos/modules/services/networking/mycelium.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ in
networking.firewall.allowedTCPPorts = lib.optionals cfg.openFirewall [ 9651 ];
networking.firewall.allowedUDPPorts = lib.optionals cfg.openFirewall [ 9650 9651 ];

environment.systemPackages = [ cfg.package ];

systemd.services.mycelium = {
description = "Mycelium network";
after = [ "network.target" ];
Expand Down
3 changes: 3 additions & 0 deletions nixos/tests/mycelium/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ in
peer1.wait_for_unit("mycelium.service")
peer2.wait_for_unit("mycelium.service")
peer1.succeed("mycelium peers list | grep 192.168.1.12")
peer2.succeed("mycelium peers list | grep 192.168.1.11")
peer1.succeed("ping -c5 ${peer2-ip}")
peer2.succeed("ping -c5 ${peer1-ip}")
'';
Expand Down

0 comments on commit 6a3a382

Please sign in to comment.