34 lines
633 B
Nix
34 lines
633 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.grimmShared;
|
|
in
|
|
{
|
|
config =
|
|
with cfg;
|
|
lib.mkIf (enable && network) {
|
|
networking.networkmanager.enable = true;
|
|
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";
|
|
}
|