Working on reshuffling
This commit is contained in:
@@ -1,17 +1,28 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
# Relative path to assets
|
||||
wofiAssets = ../../../assets/system/conf/wofi;
|
||||
wofiFiles = builtins.readDir wofiAssets;
|
||||
|
||||
# Map filenames to source paths
|
||||
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
||||
src = "${wofiAssets}/${name}";
|
||||
});
|
||||
in
|
||||
{
|
||||
# If using Home Manager
|
||||
home-manager.users.henrov = {
|
||||
programs.wofi.enable = true;
|
||||
programs.wofi.configFile = wofiConfs."wofi.conf".src;
|
||||
programs.wofi.styleFile = wofiConfs."theming.css".src;
|
||||
# Provide a module option to enable Wofi
|
||||
options.enableWofi =
|
||||
lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||
|
||||
# Only apply config if enabled
|
||||
config = lib.mkIf (lib.getOption "enableWofi") {
|
||||
# Install Wofi system-wide
|
||||
environment.systemPackages = [
|
||||
pkgs.wofi
|
||||
];
|
||||
|
||||
# Copy config files to a standard location in /etc/xdg
|
||||
environment.etc."xdg/wofi".source = wofiAssets;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user