clan-core/clanModules/localsend.nix
a-kenji df574b0dcc
All checks were successful
checks-impure / test (pull_request) Successful in 1m20s
checks / test (pull_request) Successful in 2m14s
localsend: add notes about future integrations
2024-01-19 16:59:32 +01:00

44 lines
1.2 KiB
Nix

{ config
, pkgs
, lib
, ...
}:
{
# Integration can be improved, if the following issues get implemented:
# - cli frontend: https://github.com/localsend/localsend/issues/11
# - ipv6 support: https://github.com/localsend/localsend/issues/549
options.clan.localsend = {
enable = lib.mkEnableOption (lib.mdDoc "enable the localsend module");
defaultLocation = lib.mkOption {
type = lib.types.str;
description = "The default download location";
};
package = lib.mkPackageOption pkgs "localsend" { };
};
imports =
if config.clan.localsend.enable then
[
{
clanCore.state.localsend.folders = [
"/var/localsend"
config.clan.localsend.defaultLocation
];
environment.systemPackages = [ config.clan.localsend.package ];
networking.firewall.interfaces."zt+".allowedTCPPorts = [ 53317 ];
networking.firewall.interfaces."zt+".allowedUDPPorts = [ 53317 ];
#TODO: This is currently needed because there is no ipv6 multicasting support yet
#
systemd.network.networks."09-zerotier" = {
networkConfig = {
Address = "192.168.56.2/24";
};
};
}
]
else
[ ];
}