mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 06:14:57 +01:00
18 lines
481 B
Nix
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 ];
|
|
};
|
|
}
|