about summary refs log tree commit diff
path: root/nixos/modules/programs/sharing.nix
blob: 0fe8100bbc569b4c42864e867f737af96439c12f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ config, pkgs, lib, ... }:
{
  options.programs.sharing = {
    enable = lib.mkEnableOption ''
      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
    '';
  };
  config =
    let
      cfg = config.programs.sharing;
    in
      lib.mkIf cfg.enable {
        environment.systemPackages = [ pkgs.sharing ];
        networking.firewall.allowedTCPPorts = [ 7478 ];
      };
}