mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
add kanshi, sep. wps, navidrome update, tools
This commit is contained in:
parent
6311d0c01e
commit
431cd97efe
23 changed files with 889 additions and 544 deletions
|
|
@ -45,6 +45,8 @@ in
|
|||
};
|
||||
|
||||
hardware = {
|
||||
enableAllFirmware = true;
|
||||
cpu.amd.updateMicrocode = true;
|
||||
amdgpu = {
|
||||
opencl.enable = true;
|
||||
amdvlk = {
|
||||
|
|
@ -56,23 +58,23 @@ in
|
|||
|
||||
programs.fw-fanctrl = {
|
||||
enable = true;
|
||||
config = {
|
||||
defaultStrategy = "lazy";
|
||||
strategies = {
|
||||
"lazy" = {
|
||||
fanSpeedUpdateFrequency = 5;
|
||||
movingAverageInterval = 30;
|
||||
speedCurve = [
|
||||
{ temp = 0; speed = 15; }
|
||||
{ temp = 50; speed = 15; }
|
||||
{ temp = 65; speed = 25; }
|
||||
{ temp = 70; speed = 35; }
|
||||
{ temp = 75; speed = 50; }
|
||||
{ temp = 85; speed = 100; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
# config = {
|
||||
# defaultStrategy = "lazy";
|
||||
# strategies = {
|
||||
# "lazy" = {
|
||||
# fanSpeedUpdateFrequency = 5;
|
||||
# movingAverageInterval = 30;
|
||||
# speedCurve = [
|
||||
# { temp = 0; speed = 15; }
|
||||
# { temp = 50; speed = 15; }
|
||||
# { temp = 65; speed = 25; }
|
||||
# { temp = 70; speed = 35; }
|
||||
# { temp = 75; speed = 50; }
|
||||
# { temp = 85; speed = 100; }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
networking = {
|
||||
|
|
@ -85,7 +87,14 @@ in
|
|||
services = {
|
||||
fwupd.enable = true;
|
||||
udev.extraRules = ''
|
||||
# Make Framework 16 Ethernet Module work reliably
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
|
||||
|
||||
# disable Wakup on Framework Laptop 16 Keyboard
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0018", ATTR{power/wakeup}="disabled"
|
||||
|
||||
# disable Wakup on Framework Laptop 16 Numpad Module
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0014", ATTR{power/wakeup}="disabled"
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
@ -106,14 +115,11 @@ in
|
|||
isNixos = true;
|
||||
flakePath = "/home/swarsel/.dotfiles";
|
||||
cpuCount = 16;
|
||||
# temperatureHwmon = {
|
||||
# isAbsolutePath = true;
|
||||
# path = "/sys/devices/platform/thinkpad_hwmon/hwmon/";
|
||||
# input-filename = "temp1_input";
|
||||
# };
|
||||
# ------ -----
|
||||
# | DP-4 | |eDP-1|
|
||||
# ------ -----
|
||||
temperatureHwmon = {
|
||||
isAbsolutePath = true;
|
||||
path = "/sys/devices/virtual/thermal/thermal_zone0/";
|
||||
input-filename = "temp4_input";
|
||||
};
|
||||
startup = [
|
||||
{ command = "nextcloud --background"; }
|
||||
{ command = "vesktop --start-minimized --enable-speech-dispatcher --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime"; }
|
||||
|
|
@ -191,7 +197,7 @@ in
|
|||
mode = "1280x720";
|
||||
scale = "1";
|
||||
position = "10000,10000"; # i.e. this screen is inaccessible by moving the mouse
|
||||
workspace = "12:S";
|
||||
workspace = "14:T";
|
||||
output = "DP-4";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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" = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue