nichts/modules/wms/wayland/hyprland/module.nix

70 lines
1.4 KiB
Nix
Raw Normal View History

{
config,
pkgs,
lib,
inputs',
...
}: let
cfg = config.modules.usrEnv.desktops.hyprland;
inherit (config.meta.mainUser) username;
inherit
(inputs'.split-monitor-workspaces.packages)
split-monitor-workspaces
;
2024-10-18 18:50:55 +02:00
inherit (inputs'.hyprsplit.packages) hyprsplit;
2024-10-01 16:08:11 +02:00
inherit (inputs'.hy3.packages) hy3;
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 = {
common.default = ["gtk" "hyprland"];
};
};
home-manager.users.${username} = {
wayland.windowManager.hyprland = {
enable = true;
inherit (cfg) package;
# Split-monitor-workspaces provides awesome-like workspace behaviour
plugins = [
2024-10-18 18:50:55 +02:00
hy3
hyprsplit
];
# Xwayland for X applications
xwayland.enable = true;
# No idea why I set this
systemd = {
enable = true;
variables = ["--all"];
};
};
};
};
}