refactor(networking): split networking into modules

This commit is contained in:
ooks-io 2024-04-09 20:52:14 +12:00
parent 4a177d2122
commit 221d9e3e33
8 changed files with 227 additions and 30 deletions

View file

@ -0,0 +1,30 @@
{ lib, config, ... }:
let
cfg = config.systemModules.networking;
inherit (lib) mkIf mkEnableOption;
in
{
imports = [
./firewall
./tools
./ssh
./tcp
./resolved
];
options.systemModule.networking.enable = mkEnableOption "Enable networking system module";
config = mkIf cfg.enable {
networking.networkmanager = {
enable = true;
dns = "systemd-resolved";
};
systemd = {
network.wait-online.enable = false;
services.NetworkManager-wait-online.enable = false;
};
};
}