Files
infrastructure/machines/ns1/configuration.nix
kalipso c2e3686be1
Hydra callback / on_push (pull_request) Skipped
Hydra callback / on_pr (pull_request) Failing after 41s
Check flake syntax / flake-check (push) Failing after 3m39s
[refactor] inputs.self -> inputs.malobeo
if imported in external projects `inputs.self` will point
to the external resource instead of malobeo leading to errors.
therefore all occurences of inputs.self got replaces with inputs.malobeo
2026-09-22 10:53:42 +02:00

68 lines
1.2 KiB
Nix

{ config, lib, inputs, pkgs, ... }:
with lib;
with inputs;
let
dns = inputs.dns;
in
{
networking = {
hostName = mkDefault "ns1";
useDHCP = false;
};
imports = [
inputs.malobeo.nixosModules.malobeo.users
inputs.malobeo.nixosModules.malobeo.vpn
../modules/sshd.nix
../modules/minimal_tools.nix
../modules/autoupdate.nix
];
malobeo.users = {
admin = true;
malobeo = false;
};
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?
}