mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-06 10:53:55 +00:00
55 lines
929 B
Nix
55 lines
929 B
Nix
{
|
|
x,
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
with lib;
|
|
with x;
|
|
let
|
|
cfg = config.module.hardware.network;
|
|
in
|
|
{
|
|
options = {
|
|
module.hardware.network = {
|
|
enable = mkBool;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = with pkgs; [
|
|
networkmanagerapplet
|
|
networkmanager-l2tp
|
|
pptp
|
|
];
|
|
networking = {
|
|
# FOR NETWORK
|
|
nameservers = [
|
|
"::1"
|
|
"127.0.0.1"
|
|
"1.1.1.1"
|
|
"1.0.0.1"
|
|
];
|
|
resolvconf.dnsSingleRequest = true;
|
|
networkmanager = True // {
|
|
dns = "systemd-resolved";
|
|
wifi = {
|
|
powersave = true;
|
|
macAddress = "random";
|
|
backend = "iwd";
|
|
};
|
|
};
|
|
};
|
|
services = {
|
|
resolved = True;
|
|
pptpd = True;
|
|
};
|
|
systemd.services = {
|
|
# IDK
|
|
NetworkManager-wait-online = False;
|
|
systemd-networkd-wait-online = mkForce False;
|
|
};
|
|
};
|
|
}
|