hyprland module consolidation and some refactoring
This commit is contained in:
@@ -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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user