2024-06-17 11:16:45 +02:00
|
|
|
{ self, caddy-with-plugins, ... }:
|
|
|
|
{ pkgs, modulesPath, ... }:
|
2024-02-05 11:46:52 +01:00
|
|
|
{
|
2023-06-07 08:34:16 +02:00
|
|
|
imports = [
|
2024-01-02 22:01:55 +01:00
|
|
|
(modulesPath + "/virtualisation/lxc-container.nix")
|
2023-06-07 08:34:16 +02:00
|
|
|
|
|
|
|
../../users/root
|
|
|
|
../../users/erwin
|
2024-01-22 19:57:40 +01:00
|
|
|
|
2024-03-16 22:30:15 +01:00
|
|
|
./blocky
|
2024-04-22 17:42:51 +02:00
|
|
|
./coredns
|
2024-05-08 15:54:35 +02:00
|
|
|
./promtail
|
2024-10-29 01:11:02 +01:00
|
|
|
# ./unbound
|
2023-06-07 08:34:16 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
eboskma = {
|
|
|
|
users.erwin = {
|
|
|
|
enable = true;
|
|
|
|
server = true;
|
|
|
|
};
|
2024-03-16 22:30:15 +01:00
|
|
|
# adguard = {
|
|
|
|
# upstreams = [ "127.0.0.1:5335" ];
|
|
|
|
# };
|
2024-06-17 11:16:45 +02:00
|
|
|
caddy-proxy = {
|
|
|
|
enable = true;
|
|
|
|
package = caddy-with-plugins.packages.${pkgs.system}.caddy-with-cloudflare;
|
|
|
|
proxyHosts = [
|
|
|
|
{
|
|
|
|
externalHostname = "blocky.datarift.nl";
|
|
|
|
proxyAddress = "127.0.0.1:4000";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2023-06-07 08:34:16 +02:00
|
|
|
nix-common = {
|
|
|
|
enable = true;
|
|
|
|
remote-builders = true;
|
|
|
|
};
|
2024-01-02 22:01:55 +01:00
|
|
|
tailscale.enable = true;
|
2023-06-07 08:34:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
services.resolved.extraConfig = ''
|
|
|
|
DNSStubListener=no
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 = "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
|
|
|
|
];
|
|
|
|
};
|
2023-06-07 08:34:16 +02:00
|
|
|
};
|
|
|
|
|
2024-01-02 22:01:55 +01:00
|
|
|
systemd.network = {
|
|
|
|
enable = true;
|
|
|
|
|
2024-01-22 19:57:40 +01:00
|
|
|
wait-online.anyInterface = true;
|
|
|
|
|
2024-01-02 22:01:55 +01:00
|
|
|
networks = {
|
|
|
|
"40-eth0" = {
|
|
|
|
matchConfig = {
|
|
|
|
Name = "eth0";
|
|
|
|
};
|
2023-07-05 10:08:42 +02:00
|
|
|
|
2024-01-02 22:01:55 +01:00
|
|
|
networkConfig = {
|
|
|
|
Address = "10.0.0.206/24";
|
|
|
|
Gateway = "10.0.0.1";
|
|
|
|
DNS = "127.0.0.1";
|
|
|
|
DHCP = "no";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-06-07 08:34:16 +02:00
|
|
|
|
2024-01-02 22:01:55 +01:00
|
|
|
security = {
|
|
|
|
sudo-rs = {
|
|
|
|
enable = true;
|
|
|
|
execWheelOnly = true;
|
|
|
|
wheelNeedsPassword = false;
|
|
|
|
};
|
|
|
|
sudo.enable = false;
|
|
|
|
};
|
2023-06-07 08:34:16 +02:00
|
|
|
|
2024-04-22 17:42:51 +02:00
|
|
|
sops = {
|
|
|
|
defaultSopsFile = ./secrets.yaml;
|
|
|
|
secrets = {
|
|
|
|
coredns-env = { };
|
2024-06-17 11:16:45 +02:00
|
|
|
caddy-env = { };
|
2024-04-22 17:42:51 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-06-07 08:34:16 +02:00
|
|
|
system.stateVersion = "23.11";
|
|
|
|
}
|