nix-conf/home/user/hyprland.nix
2025-01-03 16:47:35 +08:00

84 lines
1.8 KiB
Nix

{
pkgs,
lib,
inputs,
system,
hyprcursor-size,
xcursor-size,
...
}:
let
terminal = "ghostty";
startScript = import ./hypr/exec.nix {
inherit
pkgs
lib
inputs
system
terminal
xcursor-size
;
};
mainMod = "SUPER";
window = import ./hypr/window.nix;
windowrule = import ./hypr/windowrule.nix;
input = import ./hypr/input.nix;
plugins = import ./hypr/plugin.nix;
cursorName = "catppuccin-macchiato-lavender-cursors";
in
{
home.packages = with pkgs; [
hyprpaper
hyprcursor
];
systemd.user.targets.hyprland-session.Unit.Wants = [
"xdg-desktop-autostart.target"
];
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd.enable = false;
package = inputs.hyprland.packages.${system}.hyprland;
plugins =
(with inputs.hyprland-plugins.packages.${system}; [
xtra-dispatchers
hyprexpo
hyprwinwrap
])
++ ([
inputs.hyprgrass.packages.${system}.default
]);
settings =
{
bind = import ./hypr/bind.nix { inherit mainMod; };
bindm = import ./hypr/bindm.nix { inherit mainMod; };
monitor = import ./hypr/monitor.nix;
plugin = plugins;
exec-once = ''${startScript}'';
env = [
''HYPRCURSOR_THEME, ${cursorName}''
''HYPRCURSOR_SIZE, ${hyprcursor-size}''
''XCURSOR_THEME, ${cursorName}''
''XCURSOR_SIZE, ${xcursor-size}''
];
}
// window
// windowrule
// input;
};
services.hyprpaper = {
enable = true;
settings = {
preload = [ "~/.config/wallpapers/wall.png" ];
wallpaper = [ ", ~/.config/wallpapers/wall.png" ];
splash = false;
ipc = "on";
};
};
}