refactor
This commit is contained in:
parent
66c05f9093
commit
45d6f4b0f3
205 changed files with 9040 additions and 342 deletions
31
modules/nixos/cli-apps/prisma/default.nix
Normal file
31
modules/nixos/cli-apps/prisma/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.plusultra;
|
||||
let
|
||||
cfg = config.plusultra.cli-apps.prisma;
|
||||
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
|
||||
"The package to get prisma engines from";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.pkgs.npm ];
|
||||
|
||||
plusultra.home.extraOptions = {
|
||||
programs.zsh.initExtra = ''
|
||||
export PRISMA_MIGRATION_ENGINE_BINARY="${cfg.pkgs.engines}/bin/migration-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"
|
||||
export PRISMA_FMT_BINARY="${cfg.pkgs.engines}/bin/prisma-fmt"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue