Compare commits
2 Commits
a7087402f0
...
750e87181a
Author | SHA1 | Date | |
---|---|---|---|
|
750e87181a | ||
|
37c2affac9 |
@ -5,10 +5,12 @@
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
# networking.useDHCP = false; TODO: why was this globally disabled?
|
||||
# networking.useDHCP = false; TODO: why was this globally disabled? Because it should be! DHCP should only be enabled per interface.
|
||||
networking.firewall.allowedTCPPorts = [ 19999 ];
|
||||
services.netdata.enable = true;
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
|
@ -26,6 +26,10 @@
|
||||
deployment.targetUser = null;
|
||||
};
|
||||
|
||||
dns = { config, pkgs, ... }: {
|
||||
deployment.targetHost = "dns.bula22.de";
|
||||
};
|
||||
|
||||
monitoring = { config, pkgs, ... }: {
|
||||
deployment.targetHost = "monitoring.bula22.de";
|
||||
};
|
||||
@ -40,7 +44,7 @@
|
||||
};
|
||||
|
||||
pre-router = { config, pkgs, ... }: {
|
||||
deployment.targetHost = "lightbuffet.entr0py.cloud";
|
||||
deployment.targetHost = "lightbuffet.bula22.de";
|
||||
deployment.keys = {
|
||||
|
||||
};
|
||||
|
31
hosts/dns/configuration.nix
Normal file
31
hosts/dns/configuration.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./dns.nix
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "dns-1"; # Define your hostname.
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
# replicates the default behaviour.
|
||||
networking.useDHCP = false;
|
||||
#networking.interfaces.ens18.useDHCP = false;
|
||||
#networking.interfaces.ens19.useDHCP = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "21.11"; # Did you read the comment?
|
||||
|
||||
}
|
40
hosts/dns/dns.nix
Normal file
40
hosts/dns/dns.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{ config, pkgs, lib, ...}:
|
||||
|
||||
{
|
||||
networking.firewall.interfaces.ens19.allowedUDPPorts = [ 53 ];
|
||||
services.coredns = {
|
||||
enable = true;
|
||||
config = ''
|
||||
.:53 {
|
||||
log
|
||||
cache
|
||||
unbound
|
||||
}
|
||||
'';
|
||||
package = lib.fix (self: (pkgs.buildGoModule {
|
||||
inherit (pkgs.coredns) pname version src postPatch;
|
||||
|
||||
patches = pkgs.coredns.patches or [ ] ++ [
|
||||
./coredns-unbound.patch
|
||||
];
|
||||
|
||||
buildInputs = [ pkgs.unbound ];
|
||||
|
||||
vendorSha256 = "sha256-48S1oT+5uT6d+AM8u93AOTbJkW3CLtaowGv+th3cfyM=";
|
||||
|
||||
preBuild = ''
|
||||
go generate
|
||||
|
||||
postInstall () {
|
||||
cp go.mod $out
|
||||
}
|
||||
'';
|
||||
|
||||
}).overrideAttrs(old: {
|
||||
preBuild = ''
|
||||
cp ${self.passthru.go-modules}/go.mod .
|
||||
go generate
|
||||
'';
|
||||
}));
|
||||
};
|
||||
}
|
0
hosts/dns/hardware-configuration.nix
Normal file
0
hosts/dns/hardware-configuration.nix
Normal file
Loading…
Reference in New Issue
Block a user