nixos-config/machines/valkyrie/configuration.nix

96 lines
1.6 KiB
Nix
Raw Normal View History

{ self, ... }:
2024-02-05 11:46:52 +01:00
{ modulesPath, ... }:
{
imports = [
(modulesPath + "/virtualisation/lxc-container.nix")
../../users/root
../../users/erwin
./blocky
./coredns
./kea
2024-05-08 15:54:35 +02:00
./promtail
./unbound
];
eboskma = {
users.erwin = {
enable = true;
server = true;
};
# adguard = {
# upstreams = [ "127.0.0.1:5335" ];
# };
nix-common = {
enable = true;
remote-builders = true;
};
tailscale.enable = true;
};
services.resolved.extraConfig = ''
DNSStubListener=no
'';
time.timeZone = "Europe/Amsterdam";
system.configurationRevision = self.inputs.nixpkgs.lib.mkIf (self ? rev) self.rev;
networking = {
hostName = "valkyrie";
useDHCP = false;
useHostResolvConf = false;
networkmanager.enable = false;
useNetworkd = true;
nftables.enable = true;
2024-03-16 23:12:30 +01:00
firewall = {
trustedInterfaces = [ "tailscale0" ];
allowedUDPPorts = [
53
67
];
};
};
systemd.network = {
enable = true;
wait-online.anyInterface = true;
networks = {
"40-eth0" = {
matchConfig = {
Name = "eth0";
};
networkConfig = {
Address = "10.0.0.206/24";
Gateway = "10.0.0.1";
DNS = "127.0.0.1";
DHCP = "no";
};
};
};
};
security = {
sudo-rs = {
enable = true;
execWheelOnly = true;
wheelNeedsPassword = false;
};
sudo.enable = false;
};
sops = {
defaultSopsFile = ./secrets.yaml;
secrets = {
coredns-env = { };
};
};
system.stateVersion = "23.11";
}