refactor(hyprland): move hyprland config to module

This commit is contained in:
Mohammad Rafiq 2025-05-05 21:47:12 +08:00
parent 43d7825922
commit 08f64ab5a5
No known key found for this signature in database
2 changed files with 16 additions and 14 deletions

View file

@ -1,19 +1,5 @@
{ pkgs, ... }:
{
environment.loginShellInit = # sh
''
if [[ -z "$SSH_CLIENT" && -z "$SSH_CONNECTION" ]]; then
if uwsm check may-start; then
exec uwsm start hyprland-uwsm.desktop
fi
fi
'';
programs.hyprland = {
enable = true;
withUWSM = true;
};
home-manager.users.rafiq = {
xdg.configFile."uwsm/env".text = # sh
''

View file

@ -54,6 +54,22 @@ in
networking.firewall.allowedTCPPorts = [ 5353 ];
networking.firewall.allowedUDPPorts = [ 5353 ];
})
(lib.mkIf (cfg.type == "hyprland") {
environment.loginShellInit = # sh
''
if [[ -z "$SSH_CLIENT" && -z "$SSH_CONNECTION" ]]; then
if uwsm check may-start; then
exec uwsm start hyprland-uwsm.desktop
fi
fi
'';
programs.hyprland = {
enable = true;
withUWSM = true;
};
})
]
);
}