2024-12-10 20:26:33 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2023-01-09 13:17:59 +08:00
|
|
|
{
|
|
|
|
options.programs.sharing = {
|
2024-04-17 14:37:58 +03:00
|
|
|
enable = lib.mkEnableOption ''
|
2023-01-09 13:17:59 +08:00
|
|
|
sharing, a CLI tool for sharing files.
|
|
|
|
|
|
|
|
Note that it will opens the 7478 port for TCP in the firewall, which is needed for it to function properly
|
2024-04-13 14:54:15 +02:00
|
|
|
'';
|
2023-01-09 13:17:59 +08:00
|
|
|
};
|
|
|
|
config =
|
|
|
|
let
|
|
|
|
cfg = config.programs.sharing;
|
|
|
|
in
|
2024-12-10 20:26:33 +01:00
|
|
|
lib.mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ pkgs.sharing ];
|
|
|
|
networking.firewall.allowedTCPPorts = [ 7478 ];
|
|
|
|
};
|
2023-01-09 13:17:59 +08:00
|
|
|
}
|