diff --git a/modules/features/hyprland/default.nix b/modules/features/hyprland/default.nix index c106cd0..5e7b843 100644 --- a/modules/features/hyprland/default.nix +++ b/modules/features/hyprland/default.nix @@ -7,24 +7,39 @@ flake.nixosModules.hyprland = moduleWithSystem ({ self', pkgs, + system, ... }: let modules = with self.nixosModules; [ audio systemTheme ]; + runtimePkgs = self'.packages.hyprland.passthru.runtimePackages; + lib = pkgs.lib; in { imports = modules; + programs.hyprland = { enable = true; package = self'.packages.hyprland; + portalPackage = inputs.hyprland.inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland; }; + services.xserver.enable = true; security.polkit.enable = true; + environment.systemPackages = with pkgs; [ hyprlock gsettings-desktop-schemas ]; + + system.activationScripts.hyprRuntimeEnv = lib.stringAfter ["specialfs"] '' + mkdir -p /run/hypr-runtime-env/bin + ${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: pkg: '' + ln -sfn ${lib.getExe pkg} /run/hypr-runtime-env/bin/${name} + '') + runtimePkgs)} + ''; }); perSystem = { self',