furthre config on laptop

This commit is contained in:
2025-07-14 15:12:21 +02:00
parent 5b2b64611e
commit e2f428bc64
54 changed files with 1479 additions and 87 deletions
+20
View File
@@ -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;
}
+18
View File
@@ -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
'';
}
+7
View File
@@ -0,0 +1,7 @@
{ config, lib, ... }:
{
boot.blacklistedKernelModules = lib.optionals (!config.hardware.enableRedistributableFirmware) [
"ath3k"
];
}
+13
View File
@@ -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
);
}
+5
View File
@@ -0,0 +1,5 @@
{ lib, ... }:
{
services.fstrim.enable = lib.mkDefault true;
}