replace app with discourse module

This commit is contained in:
Yisroel Baum 2026-07-19 10:29:50 +03:00
parent 63a68f8ae0
commit 95cdeaedfa
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
236 changed files with 357 additions and 31169 deletions

View file

@ -1,76 +1,29 @@
{
inputs = {
nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }:
description = "NixOS module for the Torah Im Derech Eretz forum";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs =
{
self,
nixpkgs,
}:
let
perSystem = utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
checks.tide-module = import ./nix/tests/module.nix {
inherit nixpkgs self system;
};
packages = {
tide-backend = pkgs.callPackage ./nix/packages/backend.nix { };
tide-frontend = pkgs.callPackage ./nix/packages/frontend.nix {
apiUrl = "https://apitide.yisroelbaum.com";
};
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
onefetch
php
phpPackages.composer
phpPackages.php-codesniffer
vscode-langservers-extracted
sqlite
nodejs
nixfmt-rfc-style
nixfmt-tree
cypress
yaml-language-server
typescript
postgresql
process-compose
mailpit
];
shellHook = ''
# Anchor PGDATA to the repo root so subshells in subdirs
# (e.g. backend/) reuse the same cluster instead of seeding
# a stray .postgres there.
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
export PGDATA="$REPO_ROOT/.postgres"
export PGHOST="$PGDATA"
export PGUSER="postgres"
export PGDATABASE="postgres"
if [ ! -d "$PGDATA" ]; then
echo "[pg] initializing cluster at $PGDATA"
initdb --auth=trust --username=postgres --no-locale --encoding=UTF8 >/dev/null
{
echo "listen_addresses = '127.0.0.1'"
echo "unix_socket_directories = '$PGDATA'"
} >> "$PGDATA/postgresql.conf"
fi
echo "[dev] run 'process-compose up' to start postgres + backend + vite"
'';
};
});
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
perSystem // {
nixosModules.tide = import ./nix/module.nix { inherit self; };
{
nixosModules.tide = import ./nix/module.nix;
nixosModules.default = self.nixosModules.tide;
overlays.default = final: prev: {
tide-backend = final.callPackage ./nix/packages/backend.nix { };
tide-frontend = final.callPackage ./nix/packages/frontend.nix {
apiUrl = "https://apitide.yisroelbaum.com";
};
checks.${system}.tide-module = import ./nix/tests/module.nix {
inherit nixpkgs self system;
};
formatter.${system} = pkgs.nixfmt-tree;
devShells.${system}.default = pkgs.mkShell {
packages = [ pkgs.nixfmt-tree ];
};
};
}