Reshuffling stuff

This commit is contained in:
2026-03-18 18:17:39 +00:00
parent e600bd3b52
commit 2fcfe478a8
2 changed files with 24 additions and 58 deletions
+12 -29
View File
@@ -1850,39 +1850,22 @@ the top of the file."
** =generated/modules/apps/wofi.nix=
This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder
#+BEGIN_SRC nix :tangle generated/modules/apps/wofi.nix :noweb tangle :mkdirp yes :eval never-html
{
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;
};
};
}