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 9c3892a
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
(current: new: mkAliasOptionModule [new] [current])
{
options = "opts";
globalOptions = "globalOpts";
localOptions = "localOpts";
};

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 = {};
globalOptions = {};
localOptions = {};
};
}

0 comments on commit 9c3892a

Please sign in to comment.