add kanshi, sep. wps, navidrome update, tools

This commit is contained in:
Leon Schwarzäugl 2025-03-19 17:14:49 +01:00
parent 6311d0c01e
commit 431cd97efe
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
23 changed files with 889 additions and 544 deletions

View file

@ -1,22 +1,42 @@
{ config, lib, modulesPath, ... }:
{ config, pkgs, lib, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
# Fix Wlan after suspend or Hibernate
environment.etc."systemd/system-sleep/fix-wifi.sh".source =
pkgs.writeShellScript "fix-wifi.sh" ''
case $1/$2 in
pre/*)
${pkgs.kmod}/bin/modprobe -r mt7921e mt792x_lib mt76
echo 1 > /sys/bus/pci/devices/0000:04:00.0/remove
;;
post/*)
${pkgs.kmod}/bin/modprobe mt7921e
echo 1 > /sys/bus/pci/rescan
;;
esac
'';
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "cryptd" "usbhid" "sd_mod" "r8152" ];
boot.initrd.kernelModules = [ ];
boot.initrd.kernelModules = [ "sg" ];
boot.kernelModules = [ "kvm-amd" ];
# Fix screen flickering issue at the cost of battery life (disable PSR and PSR-SU, keep PR enabled)
# TODO: figure out if this is worth it
# test PSR/PR state with 'sudo grep '' /sys/kernel/debug/dri/0000*/eDP-2/*_capability'
# ref:
# https://old.reddit.com/r/framework/comments/1goh7hc/anyone_else_get_this_screen_flickering_issue/
# https://www.reddit.com/r/NixOS/comments/1hjruq1/graphics_corruption_on_kernel_6125_and_up/
# https://gitlab.freedesktop.org/drm/amd/-/issues/3797
boot.kernelParams = [ "amdgpu.dcdebugmask=0x410" ];
boot.kernelParams = [
"mem_sleep_default=deep"
"amd_pstate=passive"
# Fix screen flickering issue at the cost of battery life (disable PSR and PSR-SU, keep PR enabled)
# TODO: figure out if this is worth it
# test PSR/PR state with 'sudo grep '' /sys/kernel/debug/dri/0000*/eDP-2/*_capability'
# ref:
# https://old.reddit.com/r/framework/comments/1goh7hc/anyone_else_get_this_screen_flickering_issue/
# https://www.reddit.com/r/NixOS/comments/1hjruq1/graphics_corruption_on_kernel_6125_and_up/
# https://gitlab.freedesktop.org/drm/amd/-/issues/3797
"amdgpu.dcdebugmask=0x410"
];
boot.extraModulePackages = [ ];
boot.initrd.luks.devices."cryptroot" = {