hyprland module consolidation and some refactoring

This commit is contained in:
cnst
2024-10-29 18:33:37 +01:00
parent 9609b2a47a
commit 9f05e45d68
46 changed files with 1115 additions and 806 deletions

View File

@@ -1,6 +1,49 @@
{umodPath, ...}: {
{
config,
lib,
pkgs,
umodPath,
osConfig,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption types mkDefault;
cfg = config.home.programs.hyprland;
hyprlandPkg = pkgs.hyprland;
isCnst = osConfig.networking.hostName == "cnix";
in {
imports = [
"${umodPath}/programs/hyprland/cnst"
"${umodPath}/programs/hyprland/toothpick"
./appearance.nix
./inputs.nix
./keybinds.nix
./rules.nix
./startup.nix
];
options = {
home.programs.hyprland = {
enable = mkEnableOption "Enable Hyprland";
};
};
config = mkIf cfg.enable {
home.programs.hyprland = {
appearance.enable = mkDefault true;
inputs.enable = mkDefault true;
keybinds.enable = mkDefault true;
rules.enable = mkDefault true;
startup.enable = mkDefault true;
};
wayland.windowManager.hyprland = {
enable = true;
package = hyprlandPkg;
systemd = {
variables = ["--all"];
extraCommands = [
"systemctl --user stop graphical-session.target"
"systemctl --user start hyprland-session.target"
];
};
};
};
}