1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6 cfg = config.programs.fcast-receiver;
7in
8{
9 meta = {
10 maintainers = pkgs.fcast-receiver.meta.maintainers;
11 };
12
13 options.programs.fcast-receiver = {
14 enable = mkEnableOption "FCast Receiver";
15 openFirewall = mkOption {
16 type = types.bool;
17 default = false;
18 description = ''
19 Open ports needed for the functionality of the program.
20 '';
21 };
22 package = mkPackageOption pkgs "fcast-receiver" { };
23 };
24
25 config = mkIf cfg.enable {
26 environment.systemPackages = [ cfg.package ];
27 networking.firewall = mkIf cfg.openFirewall {
28 allowedTCPPorts = [ 46899 ];
29 };
30 };
31}