about summary refs log tree commit diff
path: root/hosts/commons
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-02-12 09:40:22 -0800
committerFranck Cuny <franck@fcuny.net>2022-02-12 09:40:22 -0800
commitcdff2240afc17e586ac9307910880e5bc554a123 (patch)
treecf5b3105427e00fcfcad6387b65f255995332c6b /hosts/commons
parenthome-manager: start to organize user configuration (diff)
downloadworld-cdff2240afc17e586ac9307910880e5bc554a123.tar.gz
hosts: centralize network configuration
Diffstat (limited to 'hosts/commons')
-rw-r--r--hosts/commons/default.nix3
-rw-r--r--hosts/commons/network.nix19
2 files changed, 22 insertions, 0 deletions
diff --git a/hosts/commons/default.nix b/hosts/commons/default.nix
index d49247a..d7773d4 100644
--- a/hosts/commons/default.nix
+++ b/hosts/commons/default.nix
@@ -1,6 +1,9 @@
 { config, pkgs, system, inputs, ... }:
 
 {
+  imports = [
+    ./network.nix
+  ]
   environment = {
     # Activate home-manager environment, if not already enabled
     loginShellInit = ''
diff --git a/hosts/commons/network.nix b/hosts/commons/network.nix
new file mode 100644
index 0000000..c44f7a4
--- /dev/null
+++ b/hosts/commons/network.nix
@@ -0,0 +1,19 @@
+{ config, pkgs, hostname, ... }:
+
+{
+  networking = {
+    hostName = hostname;
+    useNetworkd = true;
+    wireless.enable = false;
+    useDHCP = false;
+  };
+
+  services.nscd.enable = false;
+  system.nssModules = lib.mkForce [ ];
+
+  # Use systemd-resolved
+  services.resolved = {
+    enable = true;
+    dnssec = "false";
+  };
+}