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