made some progress
This commit is contained in:
parent
c8f6c4d818
commit
21f6f37911
35 changed files with 1176 additions and 44 deletions
30
modules/nixos/hardware/audio/default.nix
Normal file
30
modules/nixos/hardware/audio/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
25
modules/nixos/hardware/bluetooth/default.nix
Normal file
25
modules/nixos/hardware/bluetooth/default.nix
Normal 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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
29
modules/nixos/hardware/gpu/amd.nix
Normal file
29
modules/nixos/hardware/gpu/amd.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
31
modules/nixos/hardware/gpu/nvidia.nix
Normal file
31
modules/nixos/hardware/gpu/nvidia.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue