depot/third_party/nixpkgs/nixos/modules/programs/sharing.nix
Default email 4bac34ead1 Project import generated by Copybara.
GitOrigin-RevId: 724bfc0892363087709bd3a5a1666296759154b1
2023-02-09 12:40:11 +01:00

19 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 ];
};
}