chore: seperate opengl config, power changes, bluetooth changes

This commit is contained in:
Ruben 2024-04-22 14:14:11 -05:00
commit 1852f2ece1
No known key found for this signature in database
GPG key ID: AE181294E97E4802
6 changed files with 56 additions and 15 deletions

View file

@ -70,10 +70,19 @@
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# wireplumber exists so, lets *not* use the example session
# wireplumber exists!
wireplumber.enable = true;
};
wireplumber.configPackages = [
(pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" ''
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 ]"
}
'')
];
}

16
config/intel.nix Normal file
View file

@ -0,0 +1,16 @@
{
config,
pkgs,
...
}: {
# opengl and graphics settings
# https://nixos.wiki/wiki/Accelerated_Video_Playback
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
libvdpau-va-gl
];
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; };
}

12
config/laptop.nix Normal file
View file

@ -0,0 +1,12 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
}

View file

@ -78,7 +78,10 @@
# enables support for Bluetooth
# https://nixos.wiki/wiki/Bluetooth
hardware.bluetooth.enable = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = false;
};
# Enable CUPS to print documents.
services.printing = {

View file

@ -12,6 +12,12 @@
# use shared configuration
../../config/nixos.nix
# laptop configuration
#../../config/laptop.nix
# intel opengl setup
../../config/intel.nix
];
# who up thonking they
@ -45,17 +51,6 @@
];
};
# opengl and graphics settings
# https://nixos.wiki/wiki/Accelerated_Video_Playback
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
libvdpau-va-gl
];
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; };
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

View file

@ -12,6 +12,12 @@
# use shared configuration
../../config/nixos.nix
# laptop configuration
#../../config/laptop.nix
# intel opengl setup
../../config/intel.nix
];
# who up thunking they