mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 02:41:35 +01:00
Restructure flake
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
*.qcow2
|
*.qcow2
|
||||||
|
result
|
||||||
25
flake.nix
25
flake.nix
@@ -44,18 +44,6 @@
|
|||||||
{
|
{
|
||||||
dev-vm = self.nixosConfigurations.${system}.dev-vm.config.system.build.vm;
|
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 {
|
web = pkgs.buildNpmPackage {
|
||||||
name = "archtika-web-app";
|
name = "archtika-web-app";
|
||||||
src = ./web-app;
|
src = ./web-app;
|
||||||
@@ -77,6 +65,19 @@
|
|||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in
|
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 = {
|
web = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = "${pkgs.writeShellScriptBin "web-wrapper" ''
|
program = "${pkgs.writeShellScriptBin "web-wrapper" ''
|
||||||
|
|||||||
1
web-app/.gitignore
vendored
1
web-app/.gitignore
vendored
@@ -1,7 +1,6 @@
|
|||||||
node_modules
|
node_modules
|
||||||
user-uploads
|
user-uploads
|
||||||
user-websites
|
user-websites
|
||||||
result
|
|
||||||
|
|
||||||
# Output
|
# Output
|
||||||
.output
|
.output
|
||||||
|
|||||||
Reference in New Issue
Block a user