Reshuffling stuff
This commit is contained in:
@@ -1,36 +1,19 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
flakeRoot,
|
||||
user,
|
||||
...
|
||||
}:
|
||||
{ lib, config, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
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/system/conf/wofi"))
|
||||
(name: {
|
||||
text = builtins.readFile "${flakeRoot}/assets/system/conf/wofi/${name}";
|
||||
});
|
||||
wofiAssets = "${flakeRoot}/assets/system/conf/wofi";
|
||||
wofiFiles = builtins.readDir wofiAssets;
|
||||
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
||||
src = "${wofiAssets}/${name}";
|
||||
});
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
wofi
|
||||
];
|
||||
|
||||
home-manager.users.${user.username} = {
|
||||
home.file = {
|
||||
# Map the files to their target paths in ~/.config/wofi/
|
||||
"${wofiConfigDir}/config" = wofiConfs."wofi.conf"; # Use the actual filename
|
||||
"${wofiConfigDir}/style.css" = wofiConfs."theming.css"; # Use the actual filename
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
WOFI_CONFIG = "${wofiConfigDir}/config";
|
||||
WOFI_STYLE = "${wofiConfigDir}/style.css";
|
||||
mySystem = {
|
||||
apps.wofi = {
|
||||
enable = true;
|
||||
# symbolic references to files
|
||||
configFile = wofiConfs."wofi.conf".src;
|
||||
styleFile = wofiConfs."theming.css".src;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user