made some progress

This commit is contained in:
Chris Kruining 2025-07-23 16:12:13 +02:00
parent 5ba5d55108
commit a9a4777168
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
35 changed files with 1176 additions and 44 deletions

View file

@ -0,0 +1,30 @@
{ pkgs, lib, namespace, config, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.hardware.has.audio;
in
{
config.${namespace}.hardware.has.audio = mkEnableOption "Enable bluetooth";
config = mkIf cfg {
environment.systemPackages = with pkgs; [
sof-firmware
];
# https://wiki.nixos.org/wiki/PipeWire
security.rtkit.enable = true;
services.pulseaudio.enable = false;
services.pipewire = {
enable = true;
wireplumber.enable = true;
pulse.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
};
};
}

View file

@ -0,0 +1,25 @@
{ lib, namespace, config, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.hardware.has.bluetooth;
in
{
config.${namespace}.hardware.has.bluetooth = mkEnableOption "Enable bluetooth";
config = mkIf cfg {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
};
};
};
}

View file

@ -0,0 +1,29 @@
{ pkgs, lib, namespace, config, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.hardware.has.gpu.amd;
in
{
config.${namespace}.hardware.has.gpu.amd = mkEnableOption "Enable AMD gpu configuration";
config = mkIf cfg {
services.xserver.videoDrivers = [ "amd" ];
hardware = {
graphics = {
enable = true;
enable32Bit = true;
};
amdgpu = {
amdvlk = {
enable = true;
support32Bit.enable = true;
};
initrd.enable = true;
};
};
};
}

View file

@ -0,0 +1,31 @@
{ pkgs, lib, namespace, config, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.hardware.has.gpu.nvidia;
in
{
config.${namespace}.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration";
config = mkIf cfg {
services.xserver.videoDrivers = [ "nvidia" ];
hardware = {
graphics = {
enable = true;
enable32Bit = true;
};
nvidia = {
modesetting.enable = true;
open = false;
nvidiaSettings = true;
powerManagement = {
enable = true;
finegrained = false;
};
};
};
};
}