about summary refs log tree commit diff
path: root/modules/common
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/common/networking.nix7
-rw-r--r--modules/common/systemd.nix23
2 files changed, 24 insertions, 6 deletions
diff --git a/modules/common/networking.nix b/modules/common/networking.nix
index e891e58..2867825 100644
--- a/modules/common/networking.nix
+++ b/modules/common/networking.nix
@@ -28,11 +28,14 @@ in
         # Remove default hostname mappings. This is required at least by the
         # current implementation of the monitoring module.
         hosts = {
-          "127.0.0.1" = mkForce [ ];
+          "127.0.0.2" = mkForce [ ];
           "::1" = mkForce [ ];
         };
 
-        nameservers = mkDefault dns.const.quad9.default;
+        nameservers = with my.configurations.manwe.wireguard; [
+          ipv4.address
+          ipv6.address
+        ];
 
         useDHCP = false;
 
diff --git a/modules/common/systemd.nix b/modules/common/systemd.nix
index aac1647..81df05c 100644
--- a/modules/common/systemd.nix
+++ b/modules/common/systemd.nix
@@ -1,4 +1,10 @@
-{ config, pkgs, ... }:
+{
+  config,
+  pkgs,
+  lib,
+  ...
+}:
+with lib;
 {
   ark = {
     files = [ "/etc/machine-id" ];
@@ -16,9 +22,18 @@
     };
   };
 
-  services.journald.extraConfig = ''
-    SystemMaxUse=5G
-  '';
+  services = {
+    resolved = {
+      llmnr = "false";
+      dnsovertls = "opportunistic";
+      domains = mapAttrsToList (_: v: v) my.domain;
+      fallbackDns = map (v: "${v}#dns.quad9.net") dns.const.quad9.default;
+    };
+
+    journald.extraConfig = ''
+      SystemMaxUse=5G
+    '';
+  };
 
   systemd =
     let

Consider giving Nix/NixOS a try! <3