working on wofi

This commit is contained in:
2026-03-11 15:24:46 +01:00
parent 6e0ef11f68
commit 100d1359f3
2 changed files with 17 additions and 9 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ let
}); });
in in
{ {
# NixOS: Enable Hyprland (optional) # NixOS: Enable Hyprland
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
}; };
@@ -2,28 +2,36 @@
lib, lib,
config, config,
pkgs, pkgs,
flakeRoot,
user,
... ...
}: }:
let let
# Read the files from the local directory wofiConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/wofi";
wofiConf = builtins.readFile (toString ./assets/hyprland/conf/wofi/wofi.conf); # Dynamically read all files in assets/hyprland/conf/wofi/
wofiStyle = builtins.readFile (toString ./assets/hyprland/conf/wofi/theming.css); wofiConfs =
lib.genAttrs (builtins.attrNames (builtins.readDir "${flakeRoot}/assets/hyprland/conf/wofi"))
(name: {
text = builtins.readFile "${flakeRoot}/assets/hyprland/conf/wofi/${name}";
});
in in
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wofi wofi
]; ];
home-manager.users.henrov = { home-manager.users.${user.username} = {
home.file = { home.file = {
".config/wofi/config".text = wofiConf; inherit wofiConfs;
".config/wofi/style.css".text = wofiStyle; # Map the files to their target paths in ~/.config/wofi/
"${wofiConfigDir}/config" = wofiConfs.config;
"${wofiConfigDir}/style.css" = wofiConfs.theming.css;
}; };
home.sessionVariables = { home.sessionVariables = {
WOFI_CONFIG = "$HOME/.config/wofi/config"; WOFI_CONFIG = "${wofiConfigDir}/config";
WOFI_STYLE = "$HOME/.config/wofi/style.css"; WOFI_STYLE = "${wofiConfigDir}/style.css";
}; };
}; };
} }