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