diff options
author | PassiveLemon <lemonl3mn@protonmail.com> | 2024-01-27 12:06:23 -0500 |
---|---|---|
committer | PassiveLemon <lemonl3mn@protonmail.com> | 2024-01-27 19:45:27 -0500 |
commit | 1d3e2a92bc516a1ead80dafbd48a07fb935f684d (patch) | |
tree | 5aa5b950ffbef068e7d01c1fbb1a7c77c7e9c7a2 /nixos/modules/programs | |
parent | a2ddc20e100561d9831a01466f62b468243df6a1 (diff) | |
download | nixlib-1d3e2a92bc516a1ead80dafbd48a07fb935f684d.tar nixlib-1d3e2a92bc516a1ead80dafbd48a07fb935f684d.tar.gz nixlib-1d3e2a92bc516a1ead80dafbd48a07fb935f684d.tar.bz2 nixlib-1d3e2a92bc516a1ead80dafbd48a07fb935f684d.tar.lz nixlib-1d3e2a92bc516a1ead80dafbd48a07fb935f684d.tar.xz nixlib-1d3e2a92bc516a1ead80dafbd48a07fb935f684d.tar.zst nixlib-1d3e2a92bc516a1ead80dafbd48a07fb935f684d.zip |
nixos/alvr: init module
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/alvr.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/nixos/modules/programs/alvr.nix b/nixos/modules/programs/alvr.nix new file mode 100644 index 000000000000..c01b74ad3a51 --- /dev/null +++ b/nixos/modules/programs/alvr.nix @@ -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 ]; +} |