Working on reshuffling
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
# Path to your configuration assets
|
||||
wofiAssets = ../../../assets/system/conf/wofi;
|
||||
|
||||
# Read the files in that directory
|
||||
wofiFiles = builtins.readDir wofiAssets;
|
||||
|
||||
# Build an attribute set mapping filenames to their full paths
|
||||
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
|
||||
src = "${wofiAssets}/${name}";
|
||||
});
|
||||
|
||||
# Toggle for enabling Wofi
|
||||
enableWofi = true;
|
||||
in
|
||||
{
|
||||
# Module option to enable/disable Wofi
|
||||
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
|
||||
|
||||
# Everything in config is wrapped safely with mkIf
|
||||
config = lib.mkIf enableWofi {
|
||||
# Use myApps as a container for all your programs
|
||||
myApps = {
|
||||
wofi = {
|
||||
enable = true;
|
||||
assetsDir = wofiAssets;
|
||||
files = wofiConfs;
|
||||
|
||||
# Example: you could reference a top-level user option
|
||||
user = config.defaultUser or "henrov";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user