nixpkgs/nixos/modules/programs/fcast-receiver.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
681 B
Nix
Raw Normal View History

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