mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
module moving mostly done
This commit is contained in:
parent
a9de747c25
commit
e78a971b9b
33 changed files with 455 additions and 447 deletions
|
|
@ -1,8 +1,10 @@
|
|||
_: {
|
||||
config,
|
||||
options,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.localModules.hardware;
|
||||
in {
|
||||
options.localModules.hardware = {
|
||||
|
|
@ -19,41 +21,41 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
config =
|
||||
mkMerge [
|
||||
(
|
||||
mkIf (! cfg.gpuAcceleration.disable) {
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
config = mkMerge [
|
||||
(
|
||||
mkIf (! cfg.gpuAcceleration.disable) {
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
}
|
||||
)
|
||||
(mkIf (! cfg.sound.disable) {
|
||||
security.rtkit.enable = true;
|
||||
sound.enable = lib.mkForce false; #disable alsa
|
||||
hardware.pulseaudio.enable = lib.mkForce false; #disable pulseAudio
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
})
|
||||
]
|
||||
++ {
|
||||
}
|
||||
)
|
||||
(mkIf (! cfg.sound.disable) {
|
||||
security.rtkit.enable = true;
|
||||
sound.enable = lib.mkForce false; #disable alsa
|
||||
hardware.pulseaudio.enable = lib.mkForce false; #disable pulseAudio
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
})
|
||||
|
||||
{
|
||||
hardware = {
|
||||
enableRedistributableFirmware = true;
|
||||
cpu = {
|
||||
intel.updateMicrocode = true;
|
||||
amd.updateMicrocode = true;
|
||||
enableRedistributableFirmware = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue