nixos/lasuite-docs: use systemd bind mount instead of stateful symlink for static directory (#413308)

authored by

Martin Weinelt and committed by
GitHub
0e4118f6 3603bcb6

+3 -3
+3 -3
nixos/modules/services/web-apps/lasuite-docs.nix
··· 264 264 type = types.str; 265 265 default = if cfg.enableNginx then "localhost,127.0.0.1,${cfg.domain}" else ""; 266 266 defaultText = lib.literalExpression '' 267 - if cfg.enableNginx then "localhost,127.0.0.1,$${cfg.domain}" else "" 267 + if cfg.enableNginx then "localhost,127.0.0.1,''${cfg.domain}" else "" 268 268 ''; 269 269 description = "Comma-separated list of hosts that are able to connect to the server"; 270 270 }; ··· 348 348 wantedBy = [ "multi-user.target" ]; 349 349 350 350 preStart = '' 351 - ln -sfT ${cfg.backendPackage}/share/static /var/lib/lasuite-docs/static 352 - 353 351 if [ ! -f .version ]; then 354 352 touch .version 355 353 fi ··· 371 369 environment = pythonEnvironment; 372 370 373 371 serviceConfig = { 372 + BindReadOnlyPaths = "${cfg.backendPackage}/share/static:/var/lib/lasuite-docs/static"; 373 + 374 374 ExecStart = utils.escapeSystemdExecArgs ( 375 375 [ 376 376 (lib.getExe' cfg.backendPackage "gunicorn")