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 ]; +}