Files
nixos/Droidnix/generated/modules/apps/wofi.nix
T
2026-03-19 08:00:16 +00:00

30 lines
610 B
Nix

{ lib, ... }:
let
wofiAssets = ../../../assets/system/conf/wofi;
wofiFiles = builtins.readDir wofiAssets;
# Generate attribute set of files
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
src = "${wofiAssets}/${name}";
});
# Module options
enableWofi = true; # or set to false to disable
in
{
options = {
enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
};
# Conditional attributes returned directly
wofi = if enableWofi then {
xdg = {
wofi = {
source = wofiAssets;
files = wofiConfs;
};
};
} else {};
}