mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
nixos/alvr: init module
This commit is contained in:
parent
a2ddc20e10
commit
1d3e2a92bc
3 changed files with 38 additions and 0 deletions
35
nixos/modules/programs/alvr.nix
Normal file
35
nixos/modules/programs/alvr.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.alvr;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
programs.alvr = {
|
||||
enable = mkEnableOption (lib.mdDoc "ALVR, the VR desktop streamer");
|
||||
|
||||
package = mkPackageOption pkgs "alvr" { };
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc ''
|
||||
Whether to open the default ports in the firewall for the ALVR server.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [ 9943 9944 ];
|
||||
allowedUDPPorts = [ 9943 9944 ];
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [ passivelemon ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue