2024-09-09 00:22:14 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
2024-09-10 00:00:59 +00:00
|
|
|
pkgs,
|
2024-09-09 00:22:14 +00:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.custom.desktops.hyprland;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.custom.desktops.hyprland.enable = mkOption { default = false; };
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
custom.desktops.hyprland = mkIf config.custom.full {
|
|
|
|
binds.enable = true;
|
|
|
|
plugins.enable = true;
|
|
|
|
rules.enable = true;
|
|
|
|
settings.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/hyprwm/Hyprland
|
|
|
|
programs.hyprland.enable = true;
|
|
|
|
|
2024-09-10 00:00:59 +00:00
|
|
|
xdg.portal = {
|
|
|
|
enable = true;
|
|
|
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
|
|
|
|
|
|
|
# Prefer hyprland over gtk portal
|
|
|
|
config.common.default = [
|
|
|
|
"hyprland"
|
|
|
|
"gtk"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-09-09 00:22:14 +00:00
|
|
|
# https://wiki.hyprland.org
|
|
|
|
home-manager.users.${config.custom.username}.wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
|
|
|
systemd.variables = [ "--all" ]; # Import some environment variables into session
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|