working on wofi
This commit is contained in:
@@ -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";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user