Home: Re-enable Hyprland (HDR test)

This commit is contained in:
2026-07-18 14:13:16 +02:00
parent 481eed6ca5
commit 63670dd4c9
19 changed files with 266 additions and 10 deletions
+184 -2
View File
@@ -77,6 +77,188 @@ in
disableTabBar = true;
};
hyprland = {
enable = nixosConfig.programs.hyprland.enable;
dunst.enable = !config.homemodules.hyprpanel.enable; # Disable for hyprpanel
bars.enable = false;
dynamicCursor.enable = false;
trails.enable = true;
hyprspace.enable = false; # Always broken
hyprpanel.enable = false;
caelestia.enable = false;
keybindings = {
main-mod = "SUPER";
bindings = lib.mergeAttrsList [
# Use Rofi if we don't have caelestia
(lib.optionalAttrs (!config.homemodules.hyprland.caelestia.enable) {
"$mainMod, a" = ["exec, rofi -drun-show-actions -show drun"];
"$mainMod, c" = ["exec, clipman pick --tool=rofi"];
"$mainMod SHIFT, l" = ["exec, loginctl lock-session"];
})
# Caelestia
(lib.optionalAttrs (config.homemodules.hyprland.caelestia.enable) {
"$mainMod, a" = ["exec, caelestia shell drawers toggle launcher"];
# "$mainMod, c" = ["exec, caelestia clipboard"];
"$mainMod SHIFT, l" = ["exec, caelestia shell lock lock"];
"$mainMod, escape" = ["exec, caelestia shell drawers toggle session"];
})
{
# Applications
"$mainMod, t" = ["exec, kitty"];
"$mainMod, e" = ["exec, kitty --title=Yazi yazi"];
"$mainMod, n" = ["exec, neovide"];
# "$mainMod, r" = ["exec, kitty --title=Rmpc rmpc"];
"$mainMod CTRL, n" = ["exec, kitty --title=Navi navi"];
"$mainMod SHIFT, n" = ["exec, neovide ${config.paths.dotfiles}/navi/christoph.cheat"];
"$mainMod SHIFT, f" = ["exec, neovide ${config.paths.dotfiles}/flake.nix"];
# "ALT, tab" = ["exec, rofi -show window"];
# Screenshots
"$mainMod, p" = ["exec, hyprpicker --autocopy --format=hex"];
"$mainMod, s" = ["exec, grim -g \"$(slurp)\""];
"$mainMod SHIFT, s" = ["exec, grim -g \"$(slurp)\" - | wl-copy"];
# Audio
", XF86AudioRaiseVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"];
", XF86AudioLowerVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"];
", XF86AudioPlay" = ["exec, playerctl play-pause"];
", XF86AudioPrev" = ["exec, playerctl previous"];
", XF86AudioNext" = ["exec, playerctl next"];
# Brightness
", XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset gamma -10"];
", XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset gamma +10"];
"$mainMod, XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset temperature 5750"];
"$mainMod, XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset identity"];
"CTRL ALT, f" = let
hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
grep = "${pkgs.gnugrep}/bin/grep";
awk = "${pkgs.gawk}/bin/gawk";
notify = "${pkgs.libnotify}/bin/notify-send";
toggleMouseFocus = pkgs.writeScriptBin "hypr-toggle-mouse-focus" ''
CURRENT=$(${hyprctl} getoption input:follow_mouse | ${grep} int | ${awk} -F' ' '{print $2}')
if [[ "$CURRENT" == "1" ]]; then
${hyprctl} keyword input:follow_mouse 0
${notify} "Disabled Mouse Focus!"
else
${hyprctl} keyword input:follow_mouse 1
${notify} "Enabled Mouse Focus!"
fi
'';
in ["exec, ${toggleMouseFocus}/bin/hypr-toggle-mouse-focus"];
# "CTRL ALT, t" = ["exec, bash -c 'systemctl --user restart hyprpanel.service'"];
}
];
ws-bindings = {
# "<Workspace>" = "<Key>";
"1" = "1";
"2" = "2";
"3" = "3";
"4" = "4";
"5" = "5";
"6" = "6";
"7" = "7";
"8" = "8";
"9" = "9";
"10" = "0";
};
special-ws-bindings = {
"ferdium" = "x";
"msty" = "z";
"btop" = "b";
"rmpc" = "r";
};
};
autostart = {
immediate = [
"kitty --hold fastfetch"
# "zeal"
"nextcloud --background"
# "protonvpn-app"
# "kdeconnect-indicator" # started by services.kdeconnect.indicator
];
delayed = [
# "keepassxc" # The tray doesn't work when started too early
];
special-silent = {
# "ferdium" = ["ferdium"];
# "msty" = ["msty"];
# "btop" = ["kitty --title=Btop btop"];
# "rmpc" = ["kitty --title=Rmpc rmpc"];
};
};
windowrules = [
# Fix jetbrains tooltip flicker
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, float 1"
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, no_initial_focus 1"
];
workspacerules = {
"1" = [];
"2" = ["neovide" "code-url-handler"];
"3" = ["obsidian" "Zotero"];
"4" = ["firefox" "Google-chrome" "chromium-browser" "org.qutebrowser.qutebrowser"];
"5" = ["steam"];
"6" = ["steam_app_(.+)"];
"7" = ["signal"];
"8" = ["tidal-hifi"];
"9" = ["discord"];
"10" = ["python3"];
};
floating = [
{class = "org.kde.polkit-kde-authentication-agent-1";}
{
class = "thunar";
title = "File Operation Progress";
}
{class = "ffplay";}
{class = "Unity";}
];
transparent-opacity = "0.75";
transparent = [
"kitty"
"Alacritty"
"discord"
"signal"
"vesktop"
"Spotify"
"tidal-hifi"
"obsidian"
"firefox"
"org.qutebrowser.qutebrowser"
"jetbrains-clion"
"jetbrains-idea"
"jetbrains-pycharm"
"jetbrains-rustrover"
"jetbrains-rider"
"jetbrains-webstorm"
"code-url-handler"
"neovide"
"steam"
"ferdium"
"Msty"
];
};
mpd.enable = !headless;
niri.enable = nixosConfig.programs.niri.enable;
nnn.enable = false; # Use yazi
@@ -136,9 +318,9 @@ in
# Enable wayland
XDG_SESSION_TYPE = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_QPA_PLATFORM = "wayland;xcb";
NIXOS_OZONE_WL = "1";
SDL_VIDEODRIVER = "wayland";
# SDL_VIDEODRIVER = "wayland"; # Leave unset as gamescope uses xwayland
# Run SSH_ASKPASS as GUI, not TTY for Obsidian git
SSH_ASKPASS_REQUIRE = "prefer";
+70 -6
View File
@@ -19,6 +19,54 @@
fcitx.enable = true;
helix.enable = true;
hyprland = {
keyboard = {
layout = "us";
variant = "altgr-intl";
option = "nodeadkeys";
};
monitors = {
"DP-1" = {
width = 3440;
height = 1440;
rate = 165;
x = 1920;
y = 0;
scale = 1;
bitdepth = 10;
cm = "hdr";
};
"DP-2" = {
width = 1920;
height = 1080;
rate = 60;
x = 0;
y = 0;
scale = 1;
};
};
workspaces = {
"DP-1" = [1 2 3 4 5 6 7 8 9];
"DP-2" = [10];
};
autostart = {
delayed = [
"fcitx5"
];
};
floating = [
{
class = "fcitx";
}
];
};
waybar.monitors = ["DP-1" "DP-2"];
vscode.enable = true;
zed.enable = true;
@@ -408,10 +456,11 @@
packages = [
"com.valvesoftware.Steam"
"com.valvesoftware.Steam.Utility.steamtinkerlaunch"
"org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/24.08"
"org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
"org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/25.08" # TODO: Doesn't work
"org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/25.08"
"io.github.Foldex.AdwSteamGtk"
"com.vysp3r.ProtonPlus"
"com.github.Matoking.protontricks"
# "net.davidotek.pupgui2"
"org.prismlauncher.PrismLauncher"
@@ -432,15 +481,30 @@
];
};
"com.valvesoftware.Steam".Context = {
"com.github.Matoking.protontricks".Context = {
filesystems = [
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"
"${config.home.homeDirectory}/Games"
# This is Proton-GE installed from flatpak. ProtonUpQT doesn't require it.
"/var/lib/flatpak/runtime/com.valvesoftware.Steam.CompatibilityTool.Proton-GE"
];
};
"com.valvesoftware.Steam" = {
Environment = {
PATH = "/app/bin:/app/utils/bin:/usr/bin:/usr/lib/extensions/vulkan/gamescope/bin";
};
Context = {
filesystems = [
"${config.home.homeDirectory}/Games"
# This is Proton-GE installed from flatpak. ProtonUpQT doesn't require it.
"/var/lib/flatpak/runtime/com.valvesoftware.Steam.CompatibilityTool.Proton-GE"
# This is gamescope installed from flatpak
"/usr/lib/extensions/vulkan/gamescope/bin"
];
};
};
"net.davidotek.pupgui2".Context = {
filesystems = [
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"
+1
View File
@@ -16,6 +16,7 @@
./fish
./git
./helix
./hyprland
./jellyfin-tui
./kitty
./lazygit
+1 -1
View File
@@ -136,7 +136,7 @@ in {
sessionVariables = {
QT_QPA_PLATFORMTHEME = "gtk3"; # For Noctalia
GDK_BACKEND = "wayland"; # For screen sharing
GDK_BACKEND = "wayland,x11"; # For screen sharing
};
pointerCursor = {
+1 -1
View File
@@ -318,7 +318,7 @@ with mylib.networking; {
gpu-screen-recorder.enable = !headless;
hyprland = {
enable = false;
enable = true;
# enable = !headless;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
+6
View File
@@ -216,6 +216,12 @@
openFirewall = true; # Directly set port in firewall
};
# TODO: Doesn't work with steam flatpak
# gamescope = {
# enable = true;
# enableWsi = true;
# };
ghidra = {
enable = true;
gdb = true;
@@ -160,6 +160,9 @@
# https://discourse.nixos.org/t/nvidia-open-breaks-hardware-acceleration/58770/3
nvidia-vaapi-driver # Experimental, doesn't work with chromium
# Hdr in games with DXVK_HDR=1 ENABLE_HDR_WSI=1
vulkan-hdr-layer-kwin6
];
};