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