grimm-nixos-laptop/common/network/default.nix
2024-09-08 14:57:15 +02:00

35 lines
700 B
Nix

{
pkgs,
config,
lib,
...
}:
let
inherit (config.grimmShared) enable network laptop_hardware;
in
{
config = lib.mkIf (enable && network) {
networking.networkmanager = {
enable = true;
plugins = with pkgs; [ networkmanager-openvpn ];
};
networking.useDHCP = lib.mkDefault true;
hardware.bluetooth.enable = lib.mkDefault laptop_hardware.enable;
environment.systemPackages = with pkgs; [
wireguard-tools
openconnect
];
networking.firewall = {
enable = true;
allowPing = true;
};
};
imports = [ ./bluetooth.nix ];
options.grimmShared.network = lib.mkEnableOption "Enables network manager, wifi and bluetooth";
}