From 04118389adb60771451c395cfca6386eb2d909f9 Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Sun, 8 Mar 2026 00:12:46 +0100 Subject: [PATCH] Working on bindings --- Droidnix/generated/hyprland/hyprland.nix | 39 +++++++++++++++--------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/Droidnix/generated/hyprland/hyprland.nix b/Droidnix/generated/hyprland/hyprland.nix index 908f9b4d0..15bb0a219 100644 --- a/Droidnix/generated/hyprland/hyprland.nix +++ b/Droidnix/generated/hyprland/hyprland.nix @@ -1,26 +1,35 @@ -{ config, pkgs, lib, user, flakeRoot, ... }: +{ + config, + pkgs, + lib, + user, + flakeRoot, + ... +}: let hyprlandConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/hypr"; - # Get a list of all files in the conf directory - hyprlandConfs = lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf")) (name: { - text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/${name}"; - }); + # Dynamically read all files in assets/hyprland/conf/ + hyprlandConfs = + lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf")) + ( + name: "hypr/${name}" # Prepend "hypr/" to deploy files to ~/.config/hypr/ + ); in { + # NixOS: Enable Hyprland (optional, if you want to set it as the default session) + programs.hyprland = { + enable = true; + }; - # Hyprland-specific Home Manager configurations + # Home Manager: Deploy Hyprland configs home-manager.users.${user.username} = { - home.stateVersion = userConfig.stateVersion; - home.username = userConfig.username; - home.homeDirectory = userConfig.homeDirectory; - xdg.configFile."hypr/hyprland.conf".text = hyprlandConf; wayland.windowManager.hyprland = { enable = true; }; - }; - # Dynamically deploy all files in assets/hyprland/conf/ - xdg.configFile = hyprlandConfs // { - inherit hyprlandConfigDir; - }; + # Dynamically deploy all Hyprland config files + xdg.configFile = lib.genAttrs hyprlandConfs (path: { + text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/${lib.stringReplace "hypr/" "" path}"; + }); + }; }