Skip to content

Commit

Permalink
Backport opts rename as an alias
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Apr 22, 2024
1 parent b3ea525 commit 285ab21
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
11 changes: 11 additions & 0 deletions modules/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ with lib; {
};
};

# Added to main 2024-03-29
# Backported 2024-04-22
imports =
mapAttrsToList
(alias: to: mkAliasOptionModule [alias] [to])
{
opts = "options";
globalOpts = "globals";
localOpts = "localOptions";
};

config = {
extraConfigLuaPre =
optionalString (config.globals != {}) ''
Expand Down
13 changes: 13 additions & 0 deletions tests/test-sources/modules/options.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
opts-backport = {
opts = {};
globalOpts = {};
localOpts = {};
};

example = {
options = {};
globals = {};
localOptions = {};
};
}

0 comments on commit 285ab21

Please sign in to comment.