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
{
# NixOS: Enable Hyprland (optional)
# NixOS: Enable Hyprland
programs.hyprland = {
enable = true;
};
@@ -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";
};
};
}