furthre config on laptop
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Install tools
|
||||
environment.systemPackages = with pkgs; [
|
||||
pavucontrol
|
||||
];
|
||||
|
||||
# Enable PipeWire and its PulseAudio compatibility layer
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
pulse.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
};
|
||||
|
||||
# Disable legacy PulseAudio
|
||||
services.pulseaudio.enable = false;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
pavucontrol
|
||||
];
|
||||
services.pipewire.enable = false;
|
||||
services.pulseaudio.enable = true;
|
||||
services.pulseaudio.configFile = pkgs.writeText "default.pa" ''
|
||||
load-module module-bluetooth-policy
|
||||
load-module module-bluetooth-discover
|
||||
## module fails to load with
|
||||
## module-bluez5-device.c: Failed to get device path from module arguments
|
||||
## module.c: Failed to load module "module-bluez5-device" (argument: ""): initialization failed.
|
||||
# load-module module-bluez5-device
|
||||
# load-module module-bluez5-discover
|
||||
'';
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
boot.blacklistedKernelModules = lib.optionals (!config.hardware.enableRedistributableFirmware) [
|
||||
"ath3k"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../. ];
|
||||
|
||||
# Gnome 40 introduced a new way of managing power, without tlp.
|
||||
# However, these 2 services clash when enabled simultaneously.
|
||||
# https://github.com/NixOS/nixos-hardware/issues/260
|
||||
services.tlp.enable = lib.mkDefault (
|
||||
(lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
|
||||
|| !config.services.power-profiles-daemon.enable
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
services.fstrim.enable = lib.mkDefault true;
|
||||
}
|
||||
Reference in New Issue
Block a user