forked from Shinonome/dots-hyprland
79 lines
2.5 KiB
Nix
79 lines
2.5 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
inputs,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
cfg = config.programs.illogical-impulse;
|
|
in {
|
|
imports = [
|
|
../options.nix
|
|
];
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
wayland.windowManager.hyprland = {
|
|
# enable = true;
|
|
package = inputs.hyprland.packages.${pkgs.system}.default;
|
|
xwayland.enable = true;
|
|
systemd.enable = true;
|
|
|
|
settings = lib.mkIf cfg.settings.hyprland.useNixForConf (
|
|
lib.mkMerge [
|
|
# These imports must be functions that return an attribute set.
|
|
(import ./hyprland/hypr/keybinds.nix)
|
|
(import ./hyprland/hypr/exec.nix)
|
|
(import ./hyprland/hypr/rules.nix)
|
|
(import ./hyprland/hypr/env.nix)
|
|
# (import ./hyprland/hypr/colours.nix)
|
|
]
|
|
);
|
|
};
|
|
|
|
home.file = lib.mkMerge [
|
|
(lib.mkIf cfg.settings.hyprland.useNixForConf {
|
|
home.file = let
|
|
scriptDir = ../../.config/hypr/hyprland/scripts;
|
|
scripts = [
|
|
"fuzzel-emoji.sh"
|
|
"launch_first_available.sh"
|
|
"record.sh"
|
|
"start_geoclue_agent.sh"
|
|
"workspace_action.sh"
|
|
"zoom.sh"
|
|
];
|
|
in
|
|
lib.genAttrs
|
|
(map (name: ".config/hypr/scripts/${name}") scripts)
|
|
(path: {
|
|
source = "${scriptDir}/${builtins.baseNameOf path}";
|
|
executable = true;
|
|
});
|
|
})
|
|
(lib.mkIf (!cfg.settings.hyprland.useNixForConf) {
|
|
".config/hypr" = {
|
|
source = builtins.path {
|
|
path = ../../.config/hypr;
|
|
};
|
|
};
|
|
".config/quickshell".source = builtins.path {path = ../../.config/quickshell;};
|
|
".config/kitty".source = builtins.path {path = ../../.config/kitty;};
|
|
".config/foot".source = builtins.path {path = ../../.config/foot;};
|
|
".config/matugen".source = builtins.path {path = ../../.config/matugen;};
|
|
".config/qt5ct".source = builtins.path {path = ../../.config/qt5ct;};
|
|
".config/qt6ct".source = builtins.path {path = ../../.config/qt6ct;};
|
|
".config/wlogout".source = builtins.path {path = ../../.config/wlogout;};
|
|
".config/Kvantum".source = builtins.path {path = ../../.config/Kvantum;};
|
|
".config/xdg-desktop-portal".source = builtins.path {path = ../../.config/xdg-desktop-portal;};
|
|
})
|
|
];
|
|
|
|
home.packages =
|
|
import ../packages.nix {inherit pkgs;}
|
|
++ [
|
|
inputs.illogical-impulse.packages.${pkgs.system}.default
|
|
inputs.matugen.packages.${pkgs.system}.default
|
|
];
|
|
};
|
|
}
|