nixos-config/modules/nixos/networking.nix
2025-07-17 18:10:37 +02:00

36 lines
615 B
Nix

{
lib,
config,
...
}:
let
cfg = config.nix-config.networking;
in
{
options = {
nix-config.networking.hostName = lib.mkOption {
type = lib.types.str;
default = "nixos";
};
};
config = {
networking.hostName = cfg.hostName;
networking.networkmanager.enable = true;
networking.networkmanager.wifi.powersave = lib.mkDefault true;
users.users.${config.nix-config.userName}.extraGroups = [
"networkmanager"
];
services.avahi.enable = true;
services.avahi.openFirewall = true;
# networking.firewall = {
# enable = false;
# };
};
}