{ pkgs, config, lib, inputs, ... }: let hyprPkgs = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}; in { wayland.windowManager.hyprland = { enable = true; package = hyprPkgs.hyprland; portalPackage = hyprPkgs.xdg-desktop-portal-hyprland; xwayland.enable = true; configType = "lua"; systemd = { enable = true; variables = [ "--all" ]; }; extraConfig = '' local hypr_config = os.getenv("XDG_CONFIG_HOME") or "${config.xdg.configHome}" package.path = hypr_config .. "/hypr/?.lua;" .. hypr_config .. "/hypr/?/init.lua;" .. package.path require("conf.variables") require("conf.binding") require("conf.env") require("conf.input") require("conf.others") require("conf.monitor") require("conf.startup") require("conf.style") require("conf.windowrules") require("conf.workspace") ''; }; services.hyprpolkitagent.enable = true; home.packages = with pkgs; [ hyprpaper hyprlock wl-clipboard grim slurp ]; home.activation.symlinkHyprConf = lib.hm.dag.entryAfter [ "writeBoundary" ] '' mkdir -p ${config.home.homeDirectory}/.config/hypr unlink ${config.home.homeDirectory}/.config/hypr/conf 2>/dev/null || true ln -sf ${config.home.homeDirectory}/nixos-config/dotfiles/hypr/conf ${config.home.homeDirectory}/.config/hypr/conf ''; }