Skip to content

Commit

Permalink
fix: use updated prisma env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
jakehamilton committed Feb 11, 2024
1 parent 9dea0d6 commit af7157f
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions modules/nixos/cli-apps/prisma/default.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
{ lib, pkgs, config, ... }:

{
lib,
pkgs,
config,
...
}:
with lib;
with lib.plusultra;
let
with lib.plusultra; let
cfg = config.plusultra.cli-apps.prisma;
in
{
in {
options.plusultra.cli-apps.prisma = with types; {
enable = mkBoolOpt false "Whether or not to install Prisma";
pkgs = {
npm = mkOpt package pkgs.nodePackages.prisma "The NPM package to install";
engines = mkOpt package pkgs.prisma-engines
engines =
mkOpt package pkgs.prisma-engines
"The package to get prisma engines from";
};
};

config = mkIf cfg.enable {
environment.systemPackages = [ cfg.pkgs.npm ];
environment.systemPackages = [cfg.pkgs.npm];

plusultra.home.extraOptions = {
programs.zsh.initExtra = ''
export PRISMA_MIGRATION_ENGINE_BINARY="${cfg.pkgs.engines}/bin/migration-engine"
export PRISMA_SCHEMA_ENGINE_BINARY="${cfg.pkgs.engines}/bin/schema-engine"
export PRISMA_QUERY_ENGINE_BINARY="${cfg.pkgs.engines}/bin/query-engine"
export PRISMA_QUERY_ENGINE_LIBRARY="${cfg.pkgs.engines}/lib/libquery_engine.node"
export PRISMA_INTROSPECTION_ENGINE_BINARY="${cfg.pkgs.engines}/bin/introspection-engine"
Expand Down

0 comments on commit af7157f

Please sign in to comment.