summaryrefslogtreecommitdiffstats
path: root/modules/hardware
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-12-07 11:28:56 -0500
committerJon Santmyer <jon@jonsantmyer.com>2024-12-07 11:28:56 -0500
commitbe25e99f89ea9c05483e05c104a8c520a030484d (patch)
tree80cb6de2e93b347ffed782d963717f59c3dff587 /modules/hardware
parentc2ac689be0b8a26b4b5ec118bc6bc9adcb55800a (diff)
downloadnix-config-be25e99f89ea9c05483e05c104a8c520a030484d.tar.gz
nix-config-be25e99f89ea9c05483e05c104a8c520a030484d.tar.bz2
nix-config-be25e99f89ea9c05483e05c104a8c520a030484d.zip
some changes
Diffstat (limited to 'modules/hardware')
-rw-r--r--modules/hardware/audio.nix22
-rw-r--r--modules/hardware/bluetooth.nix2
-rw-r--r--modules/hardware/gpu.nix36
3 files changed, 23 insertions, 37 deletions
diff --git a/modules/hardware/audio.nix b/modules/hardware/audio.nix
index 3ffa32a..a674597 100644
--- a/modules/hardware/audio.nix
+++ b/modules/hardware/audio.nix
@@ -23,22 +23,18 @@ in {
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
+
+ wireplumber.extraConfig.bluetoothEnhancements = {
+ "monitor.bluez.properties" = {
+ "bluez5.enable-sbc-xq" = true;
+ "bluez5.enable-msbc" = true;
+ "bluez5.enable-hw-volume" = true;
+ };
+ };
};
user.extraGroups = ["audio"];
home.packages = [pkgs.pavucontrol];
- }
- (lib.mkIf (device.hasBluetooth) {
- home.configFile = {
- "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
- bluez_monitor.properties = {
- ["bluez5.enable-sbc-xq"] = true,
- ["bluez5.enable-msbc"] = true,
- ["bluez5.enable-hw-volume"] = true,
- ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
- }
- '';
- };
- })
+ }
]);
}
diff --git a/modules/hardware/bluetooth.nix b/modules/hardware/bluetooth.nix
index 7f835bf..c5da0fa 100644
--- a/modules/hardware/bluetooth.nix
+++ b/modules/hardware/bluetooth.nix
@@ -18,9 +18,9 @@ in {
config = lib.mkIf (bluetoothConfig.enable && device.hasBluetooth) {
hardware.bluetooth = {
enable = true;
- package = pkgs.bluez;
powerOnBoot = true;
};
+ services.blueman.enable = true;
user.extraGroups = ["bluetooth"];
};
}
diff --git a/modules/hardware/gpu.nix b/modules/hardware/gpu.nix
index bb8b831..8d2f004 100644
--- a/modules/hardware/gpu.nix
+++ b/modules/hardware/gpu.nix
@@ -36,31 +36,21 @@ in {
environment.variables.VDPAU_DRIVER = "va_gl";
})
(lib.mkIf (device.gpu == "nvidia") {
- boot = {
- extraModulePackages = [
- config.boot.kernelPackages.nvidia_x11_beta
- ];
- initrd.kernelModules = [
- "nvidia"
- "nvidia_modeset"
- "nvidia_uvm"
- "nvidia_drm"
- ];
- blacklistedKernelModules = [ "nouveau" ];
- };
+ services.xserver.videoDrivers = ["nvidia"];
+ boot.initrd.kernelModules = [ "nvidia" ];
- environment.systemPackages = with pkgs; [
- pkgs.nvidia-vaapi-driver
- ];
+ hardware.nvidia = {
+ modesetting.enable = true;
+ powerManagement.enable = false;
+ powerManagement.finegrained = false;
+ open = false;
+ nvidiaSettings = true;
+ package = config.boot.kernelPackages.nvidiaPackages.latest;
+ };
- services.xserver.videoDrivers = ["nvidia"];
- hardware.nvidia = {
- modesetting.enable = true;
- powerManagement.enable = true;
- open = false;
- nvidiaSettings = true;
- package = config.boot.kernelPackages.nvidiaPackages.beta;
- };
+ environment.systemPackages = with pkgs; [
+ nvtopPackages.nvidia
+ ];
})
]);
}