depot/third_party/nixpkgs/nixos/modules/programs/fcast-receiver.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

31 lines
669 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.fcast-receiver;
in
{
meta = {
maintainers = pkgs.fcast-receiver.meta.maintainers;
};
options.programs.fcast-receiver = {
enable = mkEnableOption "FCast Receiver";
openFirewall = mkOption {
type = types.bool;
default = false;
description = ''
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 ];
};
};
}