Skip to content

Commit

Permalink
feat: support mkLuaInline for init
Browse files Browse the repository at this point in the history
  • Loading branch information
willruggiano committed Aug 1, 2024
1 parent 951b8ec commit cf63e94
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/plugins/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ with lib; let
default = {};
};
init = mkOption {
type = nullOr (oneOf [package path]);
type = nullOr (oneOf [package path str]);
default = null;
};
config = mkOption {
Expand Down Expand Up @@ -167,6 +167,9 @@ in {
in
attrValues deps;
}
// optionalAttrs (isString attrs.init) {
init = lib.generators.mkLuaInline attrs.init;
}
// optionalAttrs (isDerivation attrs.init || isPath attrs.init) {
init = lib.generators.mkLuaInline ''dofile "${attrs.init}"'';
}
Expand Down

0 comments on commit cf63e94

Please sign in to comment.