1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 19:51:17 +00:00
nixpkgs/nixos/modules/programs/sharing.nix
ChaosAttractor b0e773adde nixos/sharing: init
Co-Authored-By: fee1-dead <ent3rm4n@gmail.com>
2023-02-06 11:35:42 +01:00

20 lines
495 B
Nix

{ config, pkgs, lib, ... }:
with lib;
{
options.programs.sharing = {
enable = mkEnableOption (lib.mdDoc ''
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 ];
};
}