nixos/envision: init module

This commit is contained in:
Gavin John 2024-07-01 17:02:11 -04:00 committed by Gavin John
parent b9d225182c
commit 454883d85b
2 changed files with 44 additions and 0 deletions

View File

@ -181,6 +181,7 @@
./programs/dublin-traceroute.nix
./programs/ecryptfs.nix
./programs/environment.nix
./programs/envision.nix
./programs/evince.nix
./programs/extra-container.nix
./programs/fcast-receiver.nix

View File

@ -0,0 +1,43 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.envision;
in
{
options = {
programs.envision = {
enable = lib.mkEnableOption "envision";
package = lib.mkPackageOption pkgs "envision" {};
openFirewall = lib.mkEnableOption "the default ports in the firewall for the WiVRn server" // {
default = true;
};
};
};
config = lib.mkIf cfg.enable {
services.avahi = {
enable = true;
publish = {
enable = true;
userServices = true;
};
};
environment.systemPackages = [ cfg.package ];
networking.firewall = lib.mkIf cfg.openFirewall {
allowedTCPPorts = [ 9757 ];
allowedUDPPorts = [ 9757 ];
};
};
meta.maintainers = pkgs.envision.meta.maintainers;
}