nixos-config/machines/frigate/configuration.nix

78 lines
1.4 KiB
Nix
Raw Normal View History

{ self, nixos-hardware, ... }:
2023-03-21 17:20:22 +01:00
{ modulesPath, ... }: {
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
nixos-hardware.nixosModules.common-cpu-intel
2023-03-21 17:20:22 +01:00
../../users/root
../../users/erwin
];
eboskma = {
2023-04-09 23:20:58 +02:00
users.erwin = {
enable = true;
server = true;
};
2023-03-21 17:20:22 +01:00
services = {
frigate.enable = true;
};
nix-common = {
enable = true;
remote-builders = true;
};
podman.enable = true;
tailscale.enable = true;
2023-03-21 17:20:22 +01:00
};
time.timeZone = "Europe/Amsterdam";
system.configurationRevision = self.inputs.nixpkgs.lib.mkIf (self ? rev) self.rev;
networking = {
hostName = "frigate";
useDHCP = false;
useHostResolvConf = false;
networkmanager.enable = false;
useNetworkd = true;
# nftables.enable = true;
2023-03-21 17:20:22 +01:00
firewall.trustedInterfaces = [ "tailscale0" ];
2023-03-21 17:20:22 +01:00
};
systemd.network = {
enable = true;
networks = {
"40-eth0" = {
matchConfig = {
Name = "eth0";
};
2023-03-21 17:20:22 +01:00
networkConfig = {
Address = "10.0.0.205/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;
};
2023-03-21 17:20:22 +01:00
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets = {
frigate = { };
};
system.stateVersion = "24.05";
2023-03-21 17:20:22 +01:00
}