35 lines
700 B
Nix
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";
|
|
}
|