2024-01-24 14:12:23 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.fcast-receiver;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
meta = {
|
|
|
|
maintainers = pkgs.fcast-receiver.meta.maintainers;
|
|
|
|
};
|
|
|
|
|
|
|
|
options.programs.fcast-receiver = {
|
2024-04-19 19:39:02 +00:00
|
|
|
enable = mkEnableOption "FCast Receiver";
|
2024-01-24 14:12:23 +00:00
|
|
|
openFirewall = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2024-04-19 19:39:02 +00:00
|
|
|
description = ''
|
2024-01-24 14:12:23 +00:00
|
|
|
Open ports needed for the functionality of the program.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
package = mkPackageOption pkgs "fcast-receiver" { };
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
networking.firewall = mkIf cfg.openFirewall {
|
|
|
|
allowedTCPPorts = [ 46899 ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|