nixos-config/machines/unifi/configuration.nix

57 lines
1.2 KiB
Nix
Raw Normal View History

2023-09-06 16:56:20 +02:00
{ self, ... }:
{ modulesPath, pkgs, ... }: {
imports = [
(modulesPath + "/virtualisation/proxmox-lxc.nix")
../../users/root
../../users/erwin
];
eboskma = {
users.erwin = {
enable = true;
server = true;
};
nix-common = {
enable = true;
remote-builders = true;
};
};
services.unifi = {
enable = true;
unifiPackage = pkgs.unifi.overrideAttrs (_oldAttrs: {
version = "7.4.162";
src = builtins.fetchurl {
url = "https://dl.ubnt.com/unifi/7.4.162/unifi_sysvinit_all.deb";
sha256 = "sha256-BpZS95NJgSRGjJhVN6Vp8/4djdQEvj+2nfay0YsVPEw=";
};
});
openFirewall = true;
};
networking.firewall = {
allowPing = true;
trustedInterfaces = [ "tailscale0" ];
allowedTCPPorts = [ 8443 ];
};
boot.isContainer = true;
time.timeZone = "Europe/Amsterdam";
system.configurationRevision = self.inputs.nixpkgs.lib.mkIf (self ? rev) self.rev;
proxmoxLXC = {
privileged = true;
};
services.tailscale.enable = true;
security.sudo.execWheelOnly = true;
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = { };
system.stateVersion = "23.11";
}