From e77cb49ffc0220da3b726ba9b78e2f6533a5b8e3 Mon Sep 17 00:00:00 2001 From: voidarc Date: Sat, 11 Jul 2026 12:40:36 +0100 Subject: [PATCH] adding symlink farm for hyprland launching --- flake.lock | 8 ++++---- modules/features/hyprland/default.nix | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 13e0754..9f4eaaa 100644 --- a/flake.lock +++ b/flake.lock @@ -373,11 +373,11 @@ "wshowkeys": "wshowkeys" }, "locked": { - "lastModified": 1783762991, - "narHash": "sha256-9qyKPHXc2fK6oZxCXLV9q0WdyNYdgCpfiAouRf+ELrc=", + "lastModified": 1783770011, + "narHash": "sha256-U+RNUy0UjDgAMIiAVZCJRmtcriGAE4tqOkprvs2/nE4=", "ref": "refs/heads/main", - "rev": "9f0f7846c04d8abe0e0a7571d9eadc4749ac910e", - "revCount": 43, + "rev": "45818e93959b636b27910689f29cb640da88c8b9", + "revCount": 44, "type": "git", "url": "https://git.voidarc.co.uk/voidarc/hypr" }, 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',