37 lines
697 B
Nix
37 lines
697 B
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
inherit (config.grimmShared) enable network laptop_hardware;
|
|
in
|
|
{
|
|
config = 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;
|
|
};
|
|
|
|
networking.nameservers = [
|
|
"1.1.1.1"
|
|
"9.9.9.9"
|
|
];
|
|
};
|
|
|
|
imports = [ ./bluetooth.nix ];
|
|
|
|
options.grimmShared.network = lib.mkEnableOption "Enables network manager, wifi and bluetooth";
|
|
}
|