mirror of
https://github.com/youwen5/liminalOS.git
synced 2025-06-20 05:59:51 -07:00
refactor: move core.networking to networking
This commit is contained in:
parent
8fb6e79cb5
commit
11762d6c0e
3 changed files with 23 additions and 30 deletions
|
@ -31,6 +31,16 @@ in
|
|||
vite = lib.mkEnableOption "firewall ports for Vite";
|
||||
};
|
||||
cloudflareNameservers.enable = lib.mkEnableOption "Cloudflare DNS servers";
|
||||
backend = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"wpa_supplicant"
|
||||
"iwd"
|
||||
];
|
||||
default = "wpa_supplicant";
|
||||
description = ''
|
||||
Which backend to use for networking. Default is wpa_supplicant with NetworkManager as a frontend. With iwd, iwctl is the frontend.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -55,5 +65,17 @@ in
|
|||
"1.1.1.1"
|
||||
"1.0.0.1"
|
||||
];
|
||||
|
||||
networking.networkmanager.enable = lib.mkIf (cfg.enable && cfg.backend == "wpa_supplicant") true;
|
||||
|
||||
systemd.services.NetworkManager-wait-online.enable = lib.mkIf (
|
||||
cfg.enable && cfg.backend == "wpa_supplicant"
|
||||
) false;
|
||||
|
||||
networking.wireless.iwd = lib.mkIf (cfg.enable && cfg.backend == "iwd") {
|
||||
enable = true;
|
||||
settings.General.EnableNetworkConfiguration = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue