Rename directories for better organization

This commit is contained in:
Vili Sinervä 2025-06-01 12:31:28 +03:00
parent 9d1bd2941f
commit de8301ba4a
Signed by: Vili Sinervä
SSH key fingerprint: SHA256:FladqYjaE4scJY3Hi+gnShZ6ygnTJgixy0I6BAoHyos
47 changed files with 52 additions and 52 deletions

View file

@ -0,0 +1,49 @@
{
config,
pkgs,
lib,
...
}:
{
environment.systemPackages = with pkgs; [ zenmonitor ];
hardware.graphics.extraPackages = with pkgs; [ rocmPackages.clr.icd ];
boot.initrd.kernelModules = [ "amdgpu" ];
services = {
xserver = lib.mkIf config.services.xserver.enable {
videoDrivers = [
"amdgpu"
"modesetting"
];
deviceSection = ''
Option "DRI" "2"
Option "TearFree" "true"
'';
};
tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 40;
#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 60; # 60 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
logind.lidSwitch = if config.boot.resumeDevice != "" then "hibernate" else "suspend";
};
}

View file

@ -0,0 +1,13 @@
{ lib, ... }:
{
swapDevices = lib.mkForce [
{
device = "/var/lib/swapfile";
size = 16 * 1024;
}
];
boot = {
resumeDevice = lib.mkDefault "/dev/mapper/nixos";
};
}

View file

@ -0,0 +1,34 @@
{ config, pkgs, ... }:
{
hardware.graphics = {
extraPackages = with pkgs; [
intel-media-driver
intel-compute-runtime
];
};
services = {
tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 40;
#Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 60; # 60 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
};
};
logind.lidSwitch = if config.boot.resumeDevice != "" then "hibernate" else "suspend";
};
}

View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; if config.services.xserver.enable then [ via ] else [ ];
# Keychron Q11
services.udev.extraRules = ''
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="3434", ATTRS{idProduct}=="01e0", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
'';
}

View file

@ -0,0 +1,15 @@
diff --git a/app/streaming/input/input.cpp b/app/streaming/input/input.cpp
index 95db06e0..d1d34fd5 100644
--- a/app/streaming/input/input.cpp
+++ b/app/streaming/input/input.cpp
@@ -39,6 +39,10 @@ SdlInputHandler::SdlInputHandler(StreamingPreferences& prefs, int streamWidth, i
m_CaptureSystemKeysMode = StreamingPreferences::CSK_ALWAYS;
}
+ // This is used to always grab the OS-modified input for the mouse
+ // This is because I am using OS-level functionality for mouse acceleration
+ SDL_SetHint(SDL_HINT_MOUSE_RELATIVE_MODE_WARP, "1");
+
// Allow gamepad input when the app doesn't have focus if requested
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, prefs.backgroundGamepad ? "1" : "0");

View file

@ -0,0 +1,18 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
(onlykey.override (prev: {
node_webkit = prev.node_webkit.overrideAttrs {
version = "0.71.1";
src = fetchurl {
url = "https://dl.nwjs.io/v0.71.1/nwjs-v0.71.1-linux-x64.tar.gz";
hash = "sha256-bnObpwfJ6SNJdOvzWTnh515JMcadH1+fxx5W9e4gl/4=";
};
};
}))
onlykey-cli
];
hardware.onlykey.enable = true;
}

View file

@ -0,0 +1,74 @@
{ ... }:
{
nixpkgs.overlays = [
(final: prev: {
moonlight-qt = prev.moonlight-qt.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ./moonlight-trackball-accel.patch ];
});
})
];
hardware.logitech.wireless = {
enable = true;
enableGraphical = true;
};
services.libinput.mouse = {
accelProfile = "custom";
accelStepMotion = 5.0e-2;
accelPointsMotion = [
0.0
2.0e-2
4.0e-2
6.0e-2
8.0e-2
0.1
0.12
0.14
0.16
0.18
0.2
0.2525
0.31
0.3725
0.44
0.5125
0.59
0.6725
0.76
0.8525
0.95
1.155
1.37
1.595
1.83
2.075
2.33
2.595
2.87
3.155
3.45
3.755
4.07
4.395
4.73
5.075
5.43
5.795
6.17
6.555
6.95
7.355
7.77
8.195
8.63
9.075
9.53
9.995
10.47
10.955
11.45
11.95
];
};
}