fix: 没有 prisma db push

This commit is contained in:
Clansty 2022-09-14 22:46:52 +08:00
parent 822920440c
commit f81198f0f2
2 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,10 @@ with pkgs.lib;
type = types.package; type = types.package;
default = pkgs.callPackage "${import ./clansty-flake.nix pkgs}/packages/tgs-to-gif" { }; default = pkgs.callPackage "${import ./clansty-flake.nix pkgs}/packages/tgs-to-gif" { };
}; };
prisma-package = mkOption {
type = types.package;
default = callPackage ./prismaPatched.nix { };
};
tg.api-id = mkOption { tg.api-id = mkOption {
type = types.int; type = types.int;
}; };

View File

@ -42,6 +42,8 @@ in
serviceConfig = { serviceConfig = {
User = "q2tg"; User = "q2tg";
Group = "q2tg"; Group = "q2tg";
Restart = "on-failure";
ExecStartPre = "${cfg.prisma-package}/bin/prisma db push --accept-data-loss --skip-generate";
ExecStart = "${cfg.package}/bin/q2tg"; ExecStart = "${cfg.package}/bin/q2tg";
}; };
}; };