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