33 lines
824 B
Nix
33 lines
824 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 = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
wireguard-tools
|
|
bluetuith
|
|
];
|
|
|
|
services.blueman.enable = lib.mkIf graphical true;
|
|
|
|
systemd.user.services.mpris-proxy = lib.mkIf sound {
|
|
description = "Mpris proxy";
|
|
after = [ "network.target" "sound.target" ];
|
|
wantedBy = [ "default.target" ];
|
|
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
|
|
};
|
|
};
|
|
|
|
options.grimmShared.network = with lib; mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = "Enables network manager, wifi and bluetooth";
|
|
};
|
|
}
|