1{
2 config,
3 pkgs,
4 lib,
5 ...
6}:
7{
8 options.programs.sharing = {
9 enable = lib.mkEnableOption ''
10 sharing, a CLI tool for sharing files.
11
12 Note that it will opens the 7478 port for TCP in the firewall, which is needed for it to function properly
13 '';
14 };
15 config =
16 let
17 cfg = config.programs.sharing;
18 in
19 lib.mkIf cfg.enable {
20 environment.systemPackages = [ pkgs.sharing ];
21 networking.firewall.allowedTCPPorts = [ 7478 ];
22 };
23}