From 79cf9383950f8c4ba9c6a9f964c40af3a5e877ec Mon Sep 17 00:00:00 2001 From: Jakub Dorfman Date: Wed, 13 May 2026 23:34:02 +0200 Subject: [PATCH] added reticulum --- flake.nix | 1 + reticulum.nix | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 reticulum.nix diff --git a/flake.nix b/flake.nix index 666b385..be37683 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,7 @@ ./authelia.nix ./containers/hello.nix agenix.nixosModules.default + ./reticulum.nix ]; specialArgs = { inherit inputs; diff --git a/reticulum.nix b/reticulum.nix new file mode 100644 index 0000000..71dab51 --- /dev/null +++ b/reticulum.nix @@ -0,0 +1,46 @@ +{ config, pkgs, lib, ... }: + +{ + environment.systemPackages = [ pkgs.python3Packages.rns ]; + + environment.etc."reticulum/config".text = '' + [reticulum] + enable_transport = True + share_instance = Yes + + [interfaces] + + [[Private Backbone]] + type = BackboneInterface + enabled = yes + mode = gateway + listen_ip = 0.0.0.0 + port = 25515 + network_name = reudynet + passphrase = makbrojojo3 + ''; + + users.users.reticulum = { + isSystemUser = true; + group = "reticulum"; + description = "Reticulum daemon user"; + home = "/var/lib/reticulum"; + createHome = true; + }; + users.groups.reticulum = {}; + + systemd.services.rnsd = { + description = "Reticulum Network Stack daemon"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + serviceConfig = { + Type = "simple"; + User = "reticulum"; + ExecStart = "${pkgs.python3Packages.rns}/bin/rnsd --config /etc/reticulum"; + Restart = "on-failure"; + RestartSec = "5s"; + }; + }; + + networking.firewall.allowedTCPPorts = [ 25515 ]; +} \ No newline at end of file