WIP | unifi

This commit is contained in:
Don Harper 2024-10-05 11:57:16 -05:00
parent 7336066958
commit 439ca116c6
2 changed files with 31 additions and 0 deletions

View file

@ -14,6 +14,7 @@
../themes.nix
./podman.nix
../server/searxng.nix
../server/unifi.nix
];
networking.hostName = "fred";
boot.binfmt.emulatedSystems = ["aarch64-linux"];

30
hosts/server/unifi.nix Normal file
View file

@ -0,0 +1,30 @@
{
pkgs,
config,
...
}: {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"unifi-controller"
];
services = {
unifi = {
enable = true;
unifiPackage = pkgs.unifi8;
openFirewall = true;
};
nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts."unifi.local" = {
# forceSSL = true;
# useACMEHost = "unifi.local";
locations."/" = {
proxyPass = "https://127.0.0.1:8443";
proxyWebsockets = true;
};
};
};
};
}