make networking more tightly controlled by config values

This commit is contained in:
LordGrimmauld 2024-03-16 18:21:50 +01:00
parent a24bafbb17
commit 1816d49646
2 changed files with 24 additions and 19 deletions

View File

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

View File

@ -53,7 +53,7 @@ in {
glxinfo
alacritty
vulkan-tools
pdfaranger
pdfarranger
nomacs
gparted
];