dotfiles/modules/home/gui/desktop/hypr/land/default.nix

55 lines
1.4 KiB
Nix
Raw Normal View History

2025-03-29 23:08:26 -05:00
{
flake,
config,
pkgs,
...
}:
let
2025-04-16 12:34:55 -05:00
inherit (flake.config.people) user1;
2025-03-29 23:08:26 -05:00
user = config.home.username;
configPath = ./config;
configImports = {
animations = import (configPath + /animations.nix);
bindm = import (configPath + /bindm.nix);
binds = import (configPath + /binds.nix);
# bindl = import (configPath + /bindl.nix);
decoration = import (configPath + /decoration.nix);
dwindle = import (configPath + /dwindle.nix);
exec-once = import (configPath + /exec-once.nix) { inherit flake; };
general = import (configPath + /general.nix) { inherit config flake; };
input = import (configPath + /input.nix);
misc = import (configPath + /misc.nix);
windowrulev2 = import (configPath + /windowrulev2.nix);
xwayland = import (configPath + /xwayland.nix);
monitor = import (configPath + /monitor.nix);
bind =
let
bindConfig =
2025-04-16 12:34:55 -05:00
if user == user1 then
import (configPath + /bind-user1.nix)
2025-03-29 23:08:26 -05:00
else
2025-04-16 12:34:55 -05:00
import (configPath + /bind-user0.nix);
2025-03-29 23:08:26 -05:00
in
bindConfig;
};
in
{
wayland.windowManager.hyprland = {
enable = true;
package = null;
portalPackage = null;
xwayland.enable = true;
systemd = {
enable = true;
enableXdgAutostart = true;
extraCommands = [
"systemctl --user stop hyprland-session.target"
"systemctl --user start hyprland-session.target"
];
};
settings = configImports;
};
}