Files
publisher-dashboard/devenv.nix
igm 4d9fbdeed5 Add tea 0.10.1 nix derivation and Gitea PR skill
- Pin tea CLI to 0.10.1 to avoid TTY bug in 0.11.x
- Add .claude/skills/gitea for PR creation workflow
- Document tea CLI usage in CLAUDE.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 12:59:47 +08:00

60 lines
1.5 KiB
Nix

{ pkgs, ... }:
let
# Use tea 0.10.1 to avoid TTY bug in 0.11.x
# See: https://gitea.com/gitea/tea/issues/827
tea = pkgs.callPackage ./nix/tea.nix { };
in
{
packages = with pkgs; [
nixfmt-rfc-style
biome
git
tea
dbmate
ast-grep
dbip-city-lite
];
dotenv.enable = true;
languages.javascript = {
enable = true;
bun.enable = true;
};
services.postgres = {
enable = true;
initialDatabases = [
{ name = "reviq-dashboard"; }
{ name = "reviq-dashboard_test"; }
];
initialScript = ''
CREATE USER reviq WITH PASSWORD 'reviq' SUPERUSER;
GRANT ALL PRIVILEGES ON DATABASE "reviq-dashboard" TO reviq;
GRANT ALL PRIVILEGES ON DATABASE "reviq-dashboard_test" TO reviq;
'';
listen_addresses = "localhost";
};
processes = {
"dev-publisher-dashboard".exec = "bun run --cwd apps/publisher-dashboard dev";
"build-watch".exec = "bun run build:watch:packages";
"api-server".exec = "bun run --cwd apps/api-server dev";
};
env = {
DATABASE_URL = "postgres://reviq:reviq@localhost/reviq-dashboard?sslmode=disable";
TEST_DATABASE_URL = "postgres://reviq:reviq@localhost/reviq-dashboard_test?sslmode=disable";
GEOIP_DATABASE_PATH = "${pkgs.dbip-city-lite}/share/dbip/dbip-city-lite.mmdb";
};
scripts = {
"db-up".exec = "dbmate up";
"db-new".exec = "dbmate new \"$1\"";
"db-status".exec = "dbmate status";
"db-gen".exec = "bun run --cwd packages/db-schema generate";
"reviq".exec = "bun run --cwd apps/cli cli \"$@\"";
};
}