2023-02-09 11:40:11 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
|
|
options.programs.sharing = {
|
2024-05-15 15:35:15 +00:00
|
|
|
enable = lib.mkEnableOption ''
|
2023-02-09 11:40:11 +00:00
|
|
|
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
|
2024-04-21 15:54:59 +00:00
|
|
|
'';
|
2023-02-09 11:40:11 +00:00
|
|
|
};
|
|
|
|
config =
|
|
|
|
let
|
|
|
|
cfg = config.programs.sharing;
|
|
|
|
in
|
2024-05-15 15:35:15 +00:00
|
|
|
lib.mkIf cfg.enable {
|
2023-02-09 11:40:11 +00:00
|
|
|
environment.systemPackages = [ pkgs.sharing ];
|
|
|
|
networking.firewall.allowedTCPPorts = [ 7478 ];
|
|
|
|
};
|
|
|
|
}
|