Files
infrastructure/machines/ns1/configuration.nix
T
ahtlon 3635e27a5a
Hydra callback / on_pr (push) Skipped
Hydra callback / on_push (push) Skipped
Check flake syntax / flake-check (push) Failing after 1m50s
[ns1] start wireguard on ns1
also add fallback dns to all vpn clients
2026-09-14 15:59:16 +02:00

62 lines
1.1 KiB
Nix

{ config, self, lib, inputs, pkgs, ... }:
with lib;
with inputs;
let
dns = inputs.dns;
in
{
networking = {
hostName = mkDefault "ns1";
useDHCP = false;
};
imports = [
../modules/malobeo_user.nix
../modules/sshd.nix
../modules/minimal_tools.nix
../modules/autoupdate.nix
inputs.self.nixosModules.malobeo.vpn
];
networking.firewall = {
enable = true;
allowedTCPPorts = [ 53 ];
allowedUDPPorts = [ 53 ];
};
sops.defaultSopsFile = ./secrets.yaml;
sops.secrets.wg_private = {};
services.malobeo.vpn = {
enable = true;
name = "ns1";
privateKeyFile = config.sops.secrets.wg_private.path;
};
services.bind = {
enable = true;
forwarders = [
"1.1.1.1"
"1.0.0.1"
];
cacheNetworks = [
"127.0.0.0/24"
"10.0.0.0/24"
"192.168.1.0/24"
"10.100.0.0/24"
];
zones = {
"malobeo.org" = {
master = true;
file = pkgs.writeText "zone-malobeo.org" (dns.lib.toString "malobeo.org" (import ../modules/malobeo/zones.nix { inherit inputs; }));
};
};
};
system.stateVersion = "22.11"; # Did you read the comment?
}