nixos/envision: init module
This commit is contained in:
parent
b9d225182c
commit
454883d85b
@ -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
|
||||
|
43
nixos/modules/programs/envision.nix
Normal file
43
nixos/modules/programs/envision.nix
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user