From a734372732c62383e7f950b4f8dd9b755d9b29f9 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Tue, 14 Jan 2025 13:43:23 +0100 Subject: [PATCH] treewide: config/nixos/network -> modules/nix/core/networking --- config/nixos/default.nix | 4 ---- config/nixos/network/default.nix | 14 -------------- modules/nix/core/networking.nix | 14 +++++++++++++- 3 files changed, 13 insertions(+), 19 deletions(-) delete mode 100644 config/nixos/network/default.nix diff --git a/config/nixos/default.nix b/config/nixos/default.nix index 6e5f8f8..b2dabcd 100644 --- a/config/nixos/default.nix +++ b/config/nixos/default.nix @@ -1,11 +1,7 @@ { imports = [ ./nix - - ./network - ./programs - ./services ]; } diff --git a/config/nixos/network/default.nix b/config/nixos/network/default.nix deleted file mode 100644 index bd330cd..0000000 --- a/config/nixos/network/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{config, ...}: { - networking = { - inherit (config.local.systemVars) hostName; - networkmanager = { - enable = true; - dns = "systemd-resolved"; - wifi.powersave = true; - }; - }; - services.resolved = { - enable = true; - dnsovertls = "opportunistic"; - }; -} diff --git a/modules/nix/core/networking.nix b/modules/nix/core/networking.nix index 854128e..c09f634 100644 --- a/modules/nix/core/networking.nix +++ b/modules/nix/core/networking.nix @@ -4,6 +4,18 @@ ... }: { config = lib.mkIf (!config.local.profiles.server.enable) { - networking.nameservers = ["1.1.1.1" "1.0.0.1"]; + networking = { + inherit (config.local.systemVars) hostName; + nameservers = ["1.1.1.1" "1.0.0.1"]; + networkmanager = { + enable = true; + dns = "systemd-resolved"; + wifi.powersave = true; + }; + }; + services.resolved = { + enable = true; + dnsovertls = "opportunistic"; + }; }; }