32 lines
843 B
Nix
32 lines
843 B
Nix
{ pkgs, config, lib, ... }:
|
|
let
|
|
cfg = config.grimmShared;
|
|
in
|
|
{
|
|
config = lib.mkMerge [
|
|
(with cfg; lib.mkIf (enable && network) {
|
|
networking.networkmanager.enable = true;
|
|
networking.useDHCP = lib.mkDefault true;
|
|
networking.firewall.enable = true;
|
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
wireguard-tools
|
|
bluetuith
|
|
];
|
|
})
|
|
(with cfg; lib.mkIf (enable && network && graphical) {
|
|
services.blueman.enable = true;
|
|
})
|
|
(with cfg; lib.mkIf (enable && network && sound) {
|
|
systemd.user.services.mpris-proxy = {
|
|
description = "Mpris proxy";
|
|
after = [ "network.target" "sound.target" ];
|
|
wantedBy = [ "default.target" ];
|
|
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
|
|
};
|
|
})
|
|
];
|
|
}
|