nixos/lasuite-meet: fix preStart script for backend (#425556)

authored by

xanderio and committed by
GitHub
a70576d5 00167d90

+7 -7
+7 -7
nixos/modules/services/web-apps/lasuite-meet.nix
··· 230 230 type = types.str; 231 231 default = if cfg.enableNginx then "localhost,127.0.0.1,${cfg.domain}" else ""; 232 232 defaultText = lib.literalExpression '' 233 - if cfg.enableNginx then "localhost,127.0.0.1,$${cfg.domain}" else "" 233 + if cfg.enableNginx then "localhost,127.0.0.1,''${cfg.domain}" else "" 234 234 ''; 235 235 description = "Comma-separated list of hosts that are able to connect to the server"; 236 236 }; ··· 328 328 wantedBy = [ "multi-user.target" ]; 329 329 330 330 preStart = '' 331 - ln -sfT ${cfg.backendPackage}/share/static /var/lib/lasuite-meet/static 332 - 333 331 if [ ! -f .version ]; then 334 332 touch .version 335 333 fi 336 334 337 - if [ "${cfg.backendPackage.version}" != "$(cat .version)" ]; then 338 - ${getExe cfg.backendPackage} migrate 339 - echo -n "${cfg.backendPackage.version}" > .version 340 - fi 341 335 ${optionalString (cfg.secretKeyPath == null) '' 342 336 if [[ ! -f /var/lib/lasuite-meet/django_secret_key ]]; then 343 337 ( ··· 346 340 ) 347 341 fi 348 342 ''} 343 + if [ "${cfg.backendPackage.version}" != "$(cat .version)" ]; then 344 + ${getExe cfg.backendPackage} migrate 345 + echo -n "${cfg.backendPackage.version}" > .version 346 + fi 349 347 ''; 350 348 351 349 environment = pythonEnvironment; 352 350 353 351 serviceConfig = { 352 + BindReadOnlyPaths = "${cfg.backendPackage}/share/static:/var/lib/lasuite-meet/static"; 353 + 354 354 ExecStart = utils.escapeSystemdExecArgs ( 355 355 [ 356 356 (lib.getExe' cfg.backendPackage "gunicorn")