diff --git a/Droidnix/generated/hyprland/hyprland.nix b/Droidnix/generated/hyprland/hyprland.nix index 231f5fd27..bbea43bcf 100644 --- a/Droidnix/generated/hyprland/hyprland.nix +++ b/Droidnix/generated/hyprland/hyprland.nix @@ -16,7 +16,7 @@ let }); in { - # NixOS: Enable Hyprland (optional) + # NixOS: Enable Hyprland programs.hyprland = { enable = true; }; diff --git a/Droidnix/generated/hyprland/task_launcher/wofi.nix b/Droidnix/generated/hyprland/task_launcher/wofi.nix index b9e9702b2..13fdf8209 100644 --- a/Droidnix/generated/hyprland/task_launcher/wofi.nix +++ b/Droidnix/generated/hyprland/task_launcher/wofi.nix @@ -2,28 +2,36 @@ lib, config, pkgs, + flakeRoot, + user, ... }: let - # Read the files from the local directory - wofiConf = builtins.readFile (toString ./assets/hyprland/conf/wofi/wofi.conf); - wofiStyle = builtins.readFile (toString ./assets/hyprland/conf/wofi/theming.css); + wofiConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/wofi"; + # Dynamically read all files in assets/hyprland/conf/wofi/ + wofiConfs = + lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/wofi")) + (name: { + text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/wofi/${name}"; + }); in { environment.systemPackages = with pkgs; [ wofi ]; - home-manager.users.henrov = { + home-manager.users.${user.username} = { home.file = { - ".config/wofi/config".text = wofiConf; - ".config/wofi/style.css".text = wofiStyle; + inherit wofiConfs; + # Map the files to their target paths in ~/.config/wofi/ + "${wofiConfigDir}/config" = wofiConfs.config; + "${wofiConfigDir}/style.css" = wofiConfs.theming.css; }; home.sessionVariables = { - WOFI_CONFIG = "$HOME/.config/wofi/config"; - WOFI_STYLE = "$HOME/.config/wofi/style.css"; + WOFI_CONFIG = "${wofiConfigDir}/config"; + WOFI_STYLE = "${wofiConfigDir}/style.css"; }; }; }