From 41381e247fa7f0e25409c6ebd2798b9193dd4d0e Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 30 Sep 2022 11:40:05 +0200 Subject: [PATCH] add unifi.hades --- nixos/hosts/hades/default.nix | 1 - nixos/hosts/hades/unifi/configuration.nix | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 nixos/hosts/hades/unifi/configuration.nix diff --git a/nixos/hosts/hades/default.nix b/nixos/hosts/hades/default.nix index 73dd9ae..e2a7fb1 100644 --- a/nixos/hosts/hades/default.nix +++ b/nixos/hosts/hades/default.nix @@ -21,7 +21,6 @@ hostname = "unifi"; ip = "192.168.0.101"; mac = "5a:00:b7:6c:d1:e2"; - nix = false; } { hostname = "plex"; diff --git a/nixos/hosts/hades/unifi/configuration.nix b/nixos/hosts/hades/unifi/configuration.nix new file mode 100644 index 0000000..d3110ac --- /dev/null +++ b/nixos/hosts/hades/unifi/configuration.nix @@ -0,0 +1,20 @@ +{ config, pkgs, lib, ... }: +{ + system.stateVersion = "21.05"; + networking.interfaces.eth0.useDHCP = true; + + services.unifi = { + enable = true; + jrePackage = pkgs.jre8_headless; + unifiPackage = pkgs.unifi; + mongodbPackage = pkgs.mongodb; + openPorts = true; + }; + + # Required for Java + # gets forced to true due the lxc profile + environment.noXlibs = lib.mkForce false; + + # Unifi Web Port + networking.firewall.allowedTCPPorts = [ 8443 ]; +}