mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
nixos/envision: init module
This commit is contained in:
parent
b9d225182c
commit
454883d85b
2 changed files with 44 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue