52 lines
1.7 KiB
Nix
52 lines
1.7 KiB
Nix
{ config, lib, pkgs, ... }: {
|
|
|
|
options.homeconfig.hyprland.enable = lib.options.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
};
|
|
|
|
config = lib.mkIf config.homeconfig.hyprland.enable {
|
|
|
|
home.sessionVariables.NIX_OZONE_WL = "1";
|
|
|
|
programs.kitty.enable = lib.mkDefault true;
|
|
|
|
home.packages = with pkgs; [
|
|
pyprland
|
|
];
|
|
|
|
home.activation.extraHyprFile = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
|
if [[ ! -f ${config.home.homeDirectory}/.config/hypr/otf.conf ]]; then
|
|
touch ${config.home.homeDirectory}/.config/hypr/otf.conf
|
|
fi
|
|
|
|
if [[ ! -f ${config.home.homeDirectory}/.config/background ]]; then
|
|
cp ${config.home.homeDirectory}/Pictures/Wallpaper/bluescape.jpg ${config.home.homeDirectory}/.config/background
|
|
chmod 600 ${config.home.homeDirectory}/.config/background
|
|
fi
|
|
'';
|
|
|
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
|
|
|
systemd = {
|
|
enable = false;
|
|
variables = [ "--all" ];
|
|
};
|
|
|
|
extraConfig = (if config.homeconfig.hyprpanel.enable then ''
|
|
bind = , Print, exec, bash -c ${pkgs.hyprpanel}/share/scripts/screenshot.sh"
|
|
'' else ''
|
|
bind = , Print, exec, grim -g "$(slurp)"
|
|
'') + ''
|
|
source = ${config.home.homeDirectory}/.config/hypr/main.conf
|
|
|
|
exec-shutdown = if [[ -f ${config.home.homeDirectory}/.local/share/calcurse/.calcurse.pid ]]; then rm ${config.home.homeDirectory}/.local/share/calcurse/.calcurse.pid; fi
|
|
'';
|
|
|
|
};
|
|
};
|
|
}
|