Add unifi-controller host
This commit is contained in:
parent
5e7a118527
commit
7c65894646
23
config/hosts/unifi-controller/configuration.nix
Normal file
23
config/hosts/unifi-controller/configuration.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/vda";
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "unifi-controller";
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 53 8080 8443 8880 8843 6789 27117 ];
|
||||
allowedUDPPorts = [ 53 3478 5514 10001 1900 123 ];
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
from = 5656;
|
||||
to = 5699;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
7
config/hosts/unifi-controller/default.nix
Normal file
7
config/hosts/unifi-controller/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./unifi.nix
|
||||
];
|
||||
}
|
12
config/hosts/unifi-controller/unifi.nix
Normal file
12
config/hosts/unifi-controller/unifi.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
services.unifi = {
|
||||
enable = true;
|
||||
unifiPackage = pkgs.unifi;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
"unifi-controller"
|
||||
"mongodb"
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue