mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 02:41:35 +01:00
Restructure flake
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
*.qcow2
|
||||
result
|
||||
25
flake.nix
25
flake.nix
@@ -44,18 +44,6 @@
|
||||
{
|
||||
dev-vm = self.nixosConfigurations.${system}.dev-vm.config.system.build.vm;
|
||||
|
||||
api-setup = pkgs.writeShellScriptBin "api-setup" ''
|
||||
source .env
|
||||
|
||||
${pkgs.postgresql_16}/bin/psql $DATABASE_URL -c "ALTER DATABASE archtika SET \"app.jwt_secret\" TO '$JWT_SECRET'"
|
||||
|
||||
${pkgs.dbmate}/bin/dbmate up
|
||||
|
||||
echo "Running command: PGRST_DB_URI=\"$PGRST_DB_URI\" PGRST_JWT_SECRET=\"$JWT_SECRET\" ${pkgs.postgrest}/bin/postgrest postgrest.conf"
|
||||
|
||||
PGRST_DB_URI="$PGRST_DB_URI" PGRST_JWT_SECRET="$JWT_SECRET" ${pkgs.postgrest}/bin/postgrest postgrest.conf
|
||||
'';
|
||||
|
||||
web = pkgs.buildNpmPackage {
|
||||
name = "archtika-web-app";
|
||||
src = ./web-app;
|
||||
@@ -77,6 +65,19 @@
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
api = {
|
||||
type = "app";
|
||||
program = "${pkgs.writeShellScriptBin "api-setup" ''
|
||||
source .env
|
||||
|
||||
${pkgs.postgresql_16}/bin/psql $DATABASE_URL -c "ALTER DATABASE archtika SET \"app.jwt_secret\" TO '$JWT_SECRET'"
|
||||
|
||||
${pkgs.dbmate}/bin/dbmate up
|
||||
|
||||
PGRST_DB_URI="$PGRST_DB_URI" PGRST_JWT_SECRET="$JWT_SECRET" ${pkgs.postgrest}/bin/postgrest postgrest.conf
|
||||
''}/bin/api-setup";
|
||||
};
|
||||
|
||||
web = {
|
||||
type = "app";
|
||||
program = "${pkgs.writeShellScriptBin "web-wrapper" ''
|
||||
|
||||
1
web-app/.gitignore
vendored
1
web-app/.gitignore
vendored
@@ -1,7 +1,6 @@
|
||||
node_modules
|
||||
user-uploads
|
||||
user-websites
|
||||
result
|
||||
|
||||
# Output
|
||||
.output
|
||||
|
||||
Reference in New Issue
Block a user