This commit is contained in:
2025-08-22 19:01:41 +02:00
parent d3f752328f
commit 71384d0740
5 changed files with 112 additions and 75 deletions

View File

@@ -18,6 +18,7 @@
quiet.enable = true; quiet.enable = true;
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
kernelModules = [ "sg" ];
loader = { loader = {
systemd-boot = { systemd-boot = {
@@ -84,7 +85,7 @@
fv43u.enable = true; fv43u.enable = true;
astro-a50.enable = true; astro-a50.enable = true;
# virtual-camera.enable = true; # virtual-camera.enable = true;
# hid-fanatecff.enable = true; hid-fanatecff.enable = true;
enableAllFirmware = true; enableAllFirmware = true;
bluetooth = { bluetooth = {

View File

@@ -23,9 +23,13 @@
yt-dlp yt-dlp
f3d f3d
mpv mpv
jellyfin-mpv-shim
makemkv makemkv
libfaketime
handbrake handbrake
metadata-cleaner metadata-cleaner
mediainfo
mediainfo-gui
prismlauncher prismlauncher
@@ -53,7 +57,6 @@
blender-hip blender-hip
# development # development
# TODO: .NET 6 avalonia-ilspy
ghidra ghidra
# utils # utils

View File

@@ -13,6 +13,11 @@ in
{ {
options.hardware.fv43u = { options.hardware.fv43u = {
enable = mkEnableOption "Enable optimisations for the Gigabyte FV43U monitor"; enable = mkEnableOption "Enable optimisations for the Gigabyte FV43U monitor";
hdr = mkOption {
type = types.bool;
default = true;
description = "Enable HDR support for the Gigabyte FV43U monitor.";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@@ -43,78 +48,106 @@ in
'') '')
]; ];
home-manager.users.${username} = { home-manager.users.${username} =
home.sessionVariables = { let
ENABLE_HDR_WSI = "1"; monitorline = "DP-3,3840x2160@144,0x0,1,bitdepth,10,cm,${if cfg.hdr then "hdr" else "srgb"}";
DXVK_HDR = "1"; in
}; {
wayland.windowManager.hyprland.settings = { home.sessionVariables = {
general.layout = "master"; ENABLE_HDR_WSI = "1";
master = { DXVK_HDR = "1";
orientation = "center";
slave_count_for_center_master = 0;
mfact = 0.4;
}; };
# render.direct_scanout = 1; wayland.windowManager.hyprland.settings = {
monitor = [ general.layout = "master";
"DP-3,3840x2160@144,0x0,1,bitdepth,10,cm,auto" master = {
"DP-3,addreserved,340,0,0,0" orientation = "center";
]; slave_count_for_center_master = 0;
xwayland.force_zero_scaling = true; mfact = 0.4;
misc.vrr = 2; # VA suffers from VRR flicker };
cursor = { render.direct_scanout = 1;
min_refresh_rate = 48; /*
no_break_fs_vrr = 1; monitor = [
"${monitorline},sdrbrightness,1.3"
"DP-3,addreserved,340,0,0,0"
];
*/
monitorv2 = {
output = "DP-3";
mode = "3840x2160@144";
position = "0x0";
scale = 1;
bitdepth = 10;
addreserved = "340,0,0,0";
cm = "hdr";
sdr_min_luminance = 0.25;
sdr_max_luminance = 400;
};
xwayland.force_zero_scaling = true;
misc.vrr = 2; # VA suffers from VRR flicker
cursor = {
min_refresh_rate = 48;
no_break_fs_vrr = 1;
};
experimental.xx_color_management_v4 = true;
}; };
experimental = {
xx_color_management_v4 = true;
};
};
programs.waybar.settings.mainBar."custom/brightness" = programs.waybar.settings.mainBar =
let let
tmpFile = "${config.home-manager.users.${username}.xdg.configHome}/gbmonctl-brightness"; tmpFile = "${config.home-manager.users.${username}.xdg.configHome}/gbmonctl-brightness";
in cmd =
{ if cfg.hdr then
return-type = "json"; # sh
exec = pkgs.writeShellScript "waybar-brightness" '' ''
BRIGHTNESS=$(cat ${tmpFile} || echo "0") BRIGHTNESS=$(cat ${tmpFile} || echo "0")
if [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 1)} ]; then BRIGHTNESS=$(printf "1.%02d" $((BRIGHTNESS / 2)))
ICON="󰃚" hyprctl keyword monitor ${monitorline},sdrbrightness,$BRIGHTNESS
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 2)} ]; then ''
ICON="󰃛" else
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 3)} ]; then "${pkgs.gbmonctl}/bin/gbmonctl -prop brightness -val $BRIGHTNESS";
ICON="󰃜" in
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 4)} ]; then {
ICON="󰃝" "custom/saturation" = { };
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 5)} ]; then "custom/brightness" = {
ICON="󰃞" return-type = "json";
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 6)} ]; then exec = pkgs.writeShellScript "waybar-brightness" ''
ICON="󰃟" BRIGHTNESS=$(cat ${tmpFile} || echo "0")
else if [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 1)} ]; then
ICON="󰃠" ICON="󰃚"
fi elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 2)} ]; then
ICON="󰃛"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 3)} ]; then
ICON="󰃜"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 4)} ]; then
ICON="󰃝"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 5)} ]; then
ICON="󰃞"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 6)} ]; then
ICON="󰃟"
else
ICON="󰃠"
fi
echo "{\"text\": \"$ICON $BRIGHTNESS%\"}" echo "{\"text\": \"$ICON $BRIGHTNESS%\"}"
''; '';
on-scroll-up = pkgs.writeShellScript "waybar-brightness-up" '' on-scroll-up = pkgs.writeShellScript "waybar-brightness-up" ''
BRIGHTNESS=$(cat ${tmpFile} || echo "0") BRIGHTNESS=$(cat ${tmpFile} || echo "0")
BRIGHTNESS=$((BRIGHTNESS + 5)) BRIGHTNESS=$((BRIGHTNESS + 5))
BRIGHTNESS=$((BRIGHTNESS > 100 ? 100 : BRIGHTNESS)) BRIGHTNESS=$((BRIGHTNESS > 100 ? 100 : BRIGHTNESS))
echo $BRIGHTNESS > ${tmpFile} echo $BRIGHTNESS > ${tmpFile}
${pkgs.gbmonctl}/bin/gbmonctl -prop brightness -val $BRIGHTNESS ${cmd}
''; '';
on-scroll-down = pkgs.writeShellScript "waybar-brightness-up" '' on-scroll-down = pkgs.writeShellScript "waybar-brightness-up" ''
BRIGHTNESS=$(cat ${tmpFile} || echo "0") BRIGHTNESS=$(cat ${tmpFile} || echo "0")
BRIGHTNESS=$((BRIGHTNESS - 5)) BRIGHTNESS=$((BRIGHTNESS - 5))
BRIGHTNESS=$((BRIGHTNESS < 0 ? 0 : BRIGHTNESS)) BRIGHTNESS=$((BRIGHTNESS < 0 ? 0 : BRIGHTNESS))
echo $BRIGHTNESS > ${tmpFile} echo $BRIGHTNESS > ${tmpFile}
${pkgs.gbmonctl}/bin/gbmonctl -prop brightness -val $BRIGHTNESS ${cmd}
''; '';
exec-on-event = true; exec-on-event = true;
exec-if = "sleep 0.1"; exec-if = "sleep 0.1";
interval = "once"; interval = "once";
}; };
}; };
};
}; };
} }

View File

@@ -9,13 +9,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "hid-fanatecff"; pname = "hid-fanatecff";
version = "0.1.0"; version = "0.2.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "gotzl"; owner = "gotzl";
repo = "hid-fanatecff"; repo = "hid-fanatecff";
rev = lib.versions.majorMinor version; rev = version;
hash = "sha256-1Nm/34Er/qfel9LJp++IWd7cTh2Wi93Kgd28YLMVvWo="; hash = "sha256-M2jm8pyxHRiswV4iJEawo57GkJ2XOclIo3NxEFgK+q0=";
}; };
nativeBuildInputs = kernel.moduleBuildDependencies; nativeBuildInputs = kernel.moduleBuildDependencies;

View File

@@ -38,7 +38,7 @@ in
]; ];
}) })
rpcs3 rpcs3
wine64 wineWowPackages.stagingFull
winetricks winetricks
protontricks protontricks
mangohud mangohud