2024-08-28 13:52:43 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
inputs',
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
cfg = config.modules.usrEnv.desktops.hyprland;
|
2024-09-22 19:21:53 +02:00
|
|
|
inherit (config.meta.mainUser) username;
|
2024-08-28 13:52:43 +02:00
|
|
|
inherit
|
|
|
|
(inputs'.split-monitor-workspaces.packages)
|
|
|
|
split-monitor-workspaces
|
|
|
|
;
|
2024-10-01 16:08:11 +02:00
|
|
|
inherit (inputs'.hy3.packages) hy3;
|
2024-08-28 13:52:43 +02:00
|
|
|
inherit (lib) mkIf mkDefault;
|
|
|
|
in {
|
|
|
|
imports = [
|
|
|
|
./binds.nix
|
|
|
|
./decorations.nix
|
|
|
|
./exec.nix
|
|
|
|
./settings.nix
|
|
|
|
./workspaces.nix
|
|
|
|
];
|
|
|
|
# we disable the default hyprland module
|
|
|
|
disabledModules = ["programs/hyprland.nix"];
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
programs.hyprland = {
|
|
|
|
enable = true;
|
|
|
|
inherit (cfg) package portalPackage;
|
|
|
|
};
|
|
|
|
# xdg Portal
|
|
|
|
xdg.portal = {
|
|
|
|
enable = true;
|
|
|
|
configPackages = mkDefault [
|
|
|
|
cfg.portalPackage
|
|
|
|
];
|
|
|
|
extraPortals = [
|
|
|
|
pkgs.xdg-desktop-portal-gtk
|
|
|
|
cfg.portalPackage
|
|
|
|
];
|
|
|
|
config = {
|
2024-09-22 19:21:53 +02:00
|
|
|
common.default = ["gtk" "hyprland"];
|
2024-08-28 13:52:43 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
home-manager.users.${username} = {
|
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
|
|
|
inherit (cfg) package;
|
|
|
|
|
|
|
|
# Split-monitor-workspaces provides awesome-like workspace behaviour
|
|
|
|
plugins = [
|
|
|
|
split-monitor-workspaces
|
2024-10-01 16:08:11 +02:00
|
|
|
hy3
|
2024-08-28 13:52:43 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
# Xwayland for X applications
|
|
|
|
xwayland.enable = true;
|
|
|
|
# No idea why I set this
|
|
|
|
systemd = {
|
|
|
|
enable = true;
|
|
|
|
variables = ["--all"];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|