Skip to content

Commit

Permalink
feat: enforce settings requirement for built-in applets
Browse files Browse the repository at this point in the history
Add assertion to ensure that built-in COSMIC applets must define settings.
This prevents potential configuration issues by validating applet module structure.
  • Loading branch information
HeitorAugustoLN committed Jan 1, 2025
1 parent c5968c5 commit 97b6b3c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/applets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
]) > 0;
enabled = if isBuiltin then anySettingsSet else cfg.enable;
in
assert lib.assertMsg (
isBuiltin -> hasSettings
) "Applet module must have settings if it is a built-in applet.";
lib.mkIf enabled (
lib.mkMerge [
{
Expand Down

0 comments on commit 97b6b3c

Please sign in to comment.