Ce dépôt contient l’application principale, composée de :
- Un frontend (Svelte) utilisant :
- Un backend (Go) utilisant :
- Clonez le répertoire :
git clone https://github.com/socme-project/socme.gitcd front && bun install && cd ../- Buildez l'application :
just build- Dans le fichier
flake.nix, ajoutez le répertoiresocmedans la sectioninputset importez le modulesocme.nixosModules.socme-backend:
{
inputs = {
socme.url = "github:socme-project/socme";
};
outputs = {
# ...
modules = [
inputs.socme.nixosModules.socme-backend
];
# ...
}
}- Pour le frontend, activez le service
nginxavec la configuration suivante :
services.nginx = {
virtualHosts."localhost" = { # Changez "localhost" par votre nom de domaine si nécessaire
root =
"${inputs.socme.packages.${pkgs.system}.socme-frontend}/socme-frontend";
locations."/api/" = {
proxyPass =
"http://127.0.0.1:${toString config.services.socme-backend.port}/";
extraConfig = ''
rewrite ^/api/(.*) /$1 break;
'';
};
locations."/" = {
extraConfig = ''
try_files $uri $uri/ /index.html =404;
'';
};
};
};
}- Activez le service backend :
services.socme-backend = {
enable = true;
domain = "socme.wiki";
githubClientId = "...";
githubClientSecret = "...";
githubRedirectUrl = "...";
};