2023-01-09 06:17:59 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
options.programs.sharing = {
|
2024-04-13 14:54:15 +02:00
|
|
|
enable = mkEnableOption ''
|
2023-01-09 06:17:59 +01: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 06:17:59 +01:00
|
|
|
};
|
|
|
|
config =
|
|
|
|
let
|
|
|
|
cfg = config.programs.sharing;
|
|
|
|
in
|
|
|
|
mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ pkgs.sharing ];
|
|
|
|
networking.firewall.allowedTCPPorts = [ 7478 ];
|
|
|
|
};
|
|
|
|
}
|