86 lines
1.5 KiB
Nix
86 lines
1.5 KiB
Nix
{ self, ... }:
|
|
{
|
|
modulesPath,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
(modulesPath + "/virtualisation/lxc-container.nix")
|
|
../../users/root
|
|
../../users/erwin
|
|
];
|
|
|
|
eboskma = {
|
|
users.erwin = {
|
|
enable = true;
|
|
server = true;
|
|
};
|
|
nix-common = {
|
|
enable = true;
|
|
remote-builders = true;
|
|
};
|
|
tailscale.enable = true;
|
|
};
|
|
|
|
services.unifi = {
|
|
enable = true;
|
|
unifiPackage = pkgs.unifi8;
|
|
openFirewall = true;
|
|
};
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
system.configurationRevision = self.inputs.nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
|
|
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;
|
|
|
|
wait-online.anyInterface = 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";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
security = {
|
|
sudo-rs = {
|
|
enable = true;
|
|
execWheelOnly = true;
|
|
wheelNeedsPassword = false;
|
|
};
|
|
sudo.enable = false;
|
|
};
|
|
|
|
sops.defaultSopsFile = ./secrets.yaml;
|
|
sops.secrets = { };
|
|
|
|
system.stateVersion = "23.11";
|
|
}
|