-{ lib, config, pkgs, ... }:
+{ lib, config, pkgs, flakes, ... }:
let
cfg = config.myServices.websites.nicecoop.copanier;
pcfg = config.myEnv.websites.nicecoop.copanier;
hostname = "copanier.nc.immae.dev";
socket = "/run/nicecoop_copanier/socket.sock";
+ copanier = flakes.subflakes.public.copanier.defaultPackage.x86_64-linux;
in {
options.myServices.websites.nicecoop.copanier.enable = lib.mkEnableOption "enable nicecoop's copanier website";
ProxyPassMatch ^/static !
ProxyPass / unix://${socket}|http://${hostname}/
ProxyPassReverse / unix://${socket}|http://${hostname}/
- Alias /static ${pkgs.webapps.copanier}/${pkgs.webapps.copanier.python.sitePackages}/copanier/static
- <Directory ${pkgs.webapps.copanier}/${pkgs.webapps.copanier.python.sitePackages}/copanier/static>
+ Alias /static ${copanier}/${copanier.python.sitePackages}/copanier/static
+ <Directory ${copanier}/${copanier.python.sitePackages}/copanier/static>
AllowOverride None
Require all granted
</Directory>
EnvironmentFile = config.secrets.fullPaths."websites/nicecoop/copanier";
Type = "simple";
ExecStart = let
- python = pkgs.webapps.copanier.python.withPackages (p: [ p.gunicorn p.uvloop pkgs.webapps.copanier ]);
+ python = copanier.python.withPackages (p: [ p.gunicorn p.uvloop copanier ]);
in
"${python}/bin/gunicorn -k roll.worker.Worker copanier:app --bind unix:${socket}";
User = "wwwrun";