depot/third_party/nixpkgs/nixos/modules/programs/sharing.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

18 lines
481 B
Nix

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