mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
32 lines
669 B
Nix
32 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 ];
|
|
};
|
|
};
|
|
}
|