46 lines
No EOL
1.1 KiB
Nix
46 lines
No EOL
1.1 KiB
Nix
{ 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 ];
|
|
} |