Initial commit
This commit is contained in:
27
modules/network/networkmanager.nix
Normal file
27
modules/network/networkmanager.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.network.networkmanager;
|
||||
in
|
||||
{
|
||||
options.my.network.networkmanager = {
|
||||
wifiPowersave = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Wi-Fi powersave (may reduce performance/latency).";
|
||||
};
|
||||
|
||||
useResolved = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Use systemd-resolved for DNS.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
networking.networkmanager.wifi.powersave = cfg.wifiPowersave;
|
||||
|
||||
services.resolved.enable = cfg.useResolved;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user