Add hyprland utilities

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-06-25 17:31:49 +03:00
parent 193c665aa4
commit a69695dd73
22 changed files with 162 additions and 38 deletions

View File

@@ -1,4 +1,4 @@
{ user ? throw "user argument is required" }: { config, pkgs, ... }:
{ user ? throw "user argument is required" }: { config, inputs, lib, pkgs, ... }:
let
hmConfig = config.home-manager.users."${user.name}";
@@ -6,7 +6,24 @@ in
{
home-manager.users."${user.name}" = {
theme.enable = true;
wayland.windowManager.hyprland.initExtraConfig = "${hmConfig.theme.pkg}/bin/theme &";
home.persistence."/persist${user.home}".directories = [ "${hmConfig.xdg.relativeConfigHome}/theme" ];
wayland.windowManager.hyprland = {
initExtraConfig = ''
${hmConfig.theme.pkg}/bin/theme &
'';
settings.bind = [
"CTRL_ALT, r, exec, ${hmConfig.theme.pkg}/bin/theme"
"CTRL_ALT, t, exec, ${hmConfig.theme.pkg}/bin/theme toggle"
];
};
home = {
activation.themeInit = inputs.home-manager.lib.hm.dag.entryAfter [ "writeBoundary" ] ''
run ${hmConfig.theme.pkg}/bin/theme
'';
persistence."/persist${user.home}".directories = [ "${hmConfig.xdg.relativeConfigHome}/theme" ];
};
};
}