2023-09-06 16:56:20 +02:00
|
|
|
{ self, ... }:
|
2023-11-30 09:00:20 +01:00
|
|
|
{ modulesPath, pkgs, lib, ... }: {
|
2023-09-06 16:56:20 +02:00
|
|
|
imports = [
|
2024-01-02 22:01:55 +01:00
|
|
|
(modulesPath + "/virtualisation/lxc-container.nix")
|
2023-09-06 16:56:20 +02:00
|
|
|
../../users/root
|
|
|
|
../../users/erwin
|
|
|
|
];
|
|
|
|
|
|
|
|
eboskma = {
|
|
|
|
users.erwin = {
|
|
|
|
enable = true;
|
|
|
|
server = true;
|
|
|
|
};
|
|
|
|
nix-common = {
|
|
|
|
enable = true;
|
|
|
|
remote-builders = true;
|
|
|
|
};
|
2024-01-02 22:01:55 +01:00
|
|
|
tailscale.enable = true;
|
2023-09-06 16:56:20 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
services.unifi = {
|
|
|
|
enable = true;
|
2024-01-02 22:01:55 +01:00
|
|
|
unifiPackage = pkgs.unifi8;
|
2023-11-30 09:00:20 +01:00
|
|
|
# unifiPackage = pkgs.unifi.overrideAttrs (_oldAttrs: {
|
|
|
|
# version = "7.5.176";
|
|
|
|
# src = builtins.fetchurl {
|
|
|
|
# url = "https://dl.ubnt.com/unifi/7.5.176-1136930355/unifi_sysvinit_all.deb";
|
|
|
|
# sha256 = "prsFq09zYrB74p/MGKjwvZftw78k9wbIva5xFdk+Ztw=";
|
|
|
|
# };
|
|
|
|
# });
|
2023-09-06 16:56:20 +02:00
|
|
|
openFirewall = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
|
|
|
|
system.configurationRevision = self.inputs.nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
|
|
|
2024-01-02 22:01:55 +01:00
|
|
|
networking = {
|
|
|
|
hostName = "unifi";
|
|
|
|
useDHCP = false;
|
|
|
|
useHostResolvConf = false;
|
|
|
|
networkmanager.enable = false;
|
|
|
|
useNetworkd = true;
|
|
|
|
nftables.enable = true;
|
|
|
|
|
|
|
|
firewall = {
|
|
|
|
trustedInterfaces = [ "tailscale0" ];
|
|
|
|
allowPing = true;
|
|
|
|
allowedTCPPorts = [ 8443 ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.network = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
networks = {
|
|
|
|
"40-eth0" = {
|
|
|
|
matchConfig = {
|
|
|
|
Name = "eth0";
|
|
|
|
};
|
|
|
|
|
|
|
|
networkConfig = {
|
|
|
|
Address = "10.0.0.207/24";
|
|
|
|
Gateway = "10.0.0.1";
|
|
|
|
DNS = "10.0.0.206";
|
|
|
|
DHCP = "no";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-09-06 16:56:20 +02:00
|
|
|
};
|
|
|
|
|
2024-01-02 22:01:55 +01:00
|
|
|
security = {
|
|
|
|
sudo-rs = {
|
|
|
|
enable = true;
|
|
|
|
execWheelOnly = true;
|
|
|
|
wheelNeedsPassword = false;
|
|
|
|
};
|
|
|
|
sudo.enable = false;
|
|
|
|
};
|
2023-09-06 16:56:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
sops.defaultSopsFile = ./secrets.yaml;
|
|
|
|
sops.secrets = { };
|
|
|
|
|
|
|
|
system.stateVersion = "23.11";
|
|
|
|
}
|