helpers: add globalPrefix to mkPlugin (#284)

This commit is contained in:
Gaétan Lepage 2023-03-24 08:18:45 +01:00 committed by GitHub
parent 2550c919a5
commit 58b6c74e2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 48 additions and 42 deletions

View file

@ -192,6 +192,7 @@ with lib; rec {
extraPlugins ? [],
extraPackages ? [],
options ? {},
globalPrefix ? "",
...
}: let
cfg = config.plugins.${name};
@ -200,7 +201,7 @@ with lib; rec {
globals =
mapAttrs'
(name: opt: {
name = opt.global;
name = globalPrefix + opt.global;
value =
if cfg.${name} != null
then opt.value cfg.${name}