modules/config: init new module
Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
8
modules/nixos/config/networking/default.nix
Normal file
8
modules/nixos/config/networking/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./network-manager
|
||||
];
|
||||
networking = {
|
||||
hosts = import ./hosts.nix;
|
||||
};
|
||||
}
|
3
modules/nixos/config/networking/hosts.nix
Normal file
3
modules/nixos/config/networking/hosts.nix
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"192.168.1.42" = ["dunamis"];
|
||||
}
|
15
modules/nixos/config/networking/network-manager/default.nix
Normal file
15
modules/nixos/config/networking/network-manager/default.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
imports = [
|
||||
./wireless-iwd.nix
|
||||
];
|
||||
networking = {
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
ethernet.macAddress = "stable";
|
||||
wifi = {
|
||||
macAddress = "random";
|
||||
scanRandMacAddress = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
{config, ...}: {
|
||||
networking = {
|
||||
networkmanager.wifi.backend =
|
||||
if config.module.config.useIwd
|
||||
then "iwd"
|
||||
else "wpa_supplicant";
|
||||
wireless.iwd = {
|
||||
enable = config.module.config.useIwd;
|
||||
settings = {
|
||||
General.AddressRandomization = "network";
|
||||
Settings.AlwaysRandomizeAddress = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user