Files
nixos/modules/desktop/hypr.nix
2026-10-03 01:19:39 +02:00

110 lines
2.9 KiB
Nix

{ config, lib, pkgs, ... }:
let
hyprLib = import ../../lib/hypr.nix { inherit lib; };
mainMod = "SUPER";
in
{
imports = [
(import ./hypr-bindings.nix { inherit hyprLib mainMod; })
./hypr-input.nix
./hypr-look-and-feel.nix
(import ./hypr-passthrough.nix { inherit hyprLib mainMod; })
(import ./hypr-plugins.nix { inherit hyprLib mainMod lib pkgs; })
./hypr-rules.nix
(import ./hypr-shutdown.nix { inherit hyprLib mainMod; })
(import ./hypr-workspaces.nix { inherit hyprLib mainMod; })
./hypr-xf86.nix
./hyprapps.nix
];
_module.args.hyprLib = hyprLib;
programs.hyprland = {
enable = true;
withUWSM = true;
};
programs.uwsm = {
enable = true;
waylandCompositors = {
hyprland = {
prettyName = "Hyprland";
comment = "Hyprland compositor managed by UWSM";
binPath = "/run/current-system/sw/bin/Hyprland";
};
};
};
home-manager.users."djai".home.file.".config/hypr/scripts".source = ./scripts;
home-manager.users."djai".home.file.".config/hypr/shaders".source = ./shaders;
home-manager.users."djai".wayland.windowManager.hyprland = {
enable = true;
configType = "lua";
plugins = with pkgs; [
hyprlandPlugins.hypr-darkwindow
];
portalPackage = null;
systemd.enable = false;
settings = {
on = [ #TODO: set up exec oncess
(hyprLib.on-signal "hyprland.start" [
# "uwsm app -- /home/djai/AppImages/opencloud.appimage" # TODO: get opencloud
"uwsm app -- openrgb --noautoconnect -p aroace.orp"
"uwsm app -- kitty --class scratchme -d /home/djai/Documents/diary"
# these should be done thru systemd already
# hl.exec_cmd("nohup flameshot")
# hl.exec_cmd("hyprpm reload")
# hl.exec_cmd("kanshi")
# hl.exec_cmd("dunst")
# hl.exec_cmd("hyprctl setcursor Catppuccin-Macchiato-Dark-Cursors 24")
])
];
config = {
general = {
gaps_in = 5;
gaps_out = 1;
border_size = 2;
col = {
active_border = { colors = [
(lib.generators.mkLuaInline "colors.blue")
(lib.generators.mkLuaInline "colors.mauve")
]; angle = 45; };
inactive_border = (lib.generators.mkLuaInline "colors.mantle");
};
layout = "dwindle";
};
dwindle = {
preserve_split = true;
special_scale_factor = 0.7;
};
misc = {
enable_anr_dialog = false;
enable_swallow = false;
disable_hyprland_logo = true;
animate_manual_resizes = true;
animate_mouse_windowdragging = false;
mouse_move_focuses_monitor = true;
focus_on_activate = false;
};
ecosystem = {
no_update_news = true;
no_donation_nag = true;
};
};
};
};
}