mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/lasuite-docs: use systemd bind mount instead of stateful symlink for static directory (#413308)
This commit is contained in:
commit
0e4118f672
1 changed files with 3 additions and 3 deletions
|
@ -264,7 +264,7 @@ in
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = if cfg.enableNginx then "localhost,127.0.0.1,${cfg.domain}" else "";
|
default = if cfg.enableNginx then "localhost,127.0.0.1,${cfg.domain}" else "";
|
||||||
defaultText = lib.literalExpression ''
|
defaultText = lib.literalExpression ''
|
||||||
if cfg.enableNginx then "localhost,127.0.0.1,$${cfg.domain}" else ""
|
if cfg.enableNginx then "localhost,127.0.0.1,''${cfg.domain}" else ""
|
||||||
'';
|
'';
|
||||||
description = "Comma-separated list of hosts that are able to connect to the server";
|
description = "Comma-separated list of hosts that are able to connect to the server";
|
||||||
};
|
};
|
||||||
|
@ -348,8 +348,6 @@ in
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
preStart = ''
|
preStart = ''
|
||||||
ln -sfT ${cfg.backendPackage}/share/static /var/lib/lasuite-docs/static
|
|
||||||
|
|
||||||
if [ ! -f .version ]; then
|
if [ ! -f .version ]; then
|
||||||
touch .version
|
touch .version
|
||||||
fi
|
fi
|
||||||
|
@ -371,6 +369,8 @@ in
|
||||||
environment = pythonEnvironment;
|
environment = pythonEnvironment;
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
BindReadOnlyPaths = "${cfg.backendPackage}/share/static:/var/lib/lasuite-docs/static";
|
||||||
|
|
||||||
ExecStart = utils.escapeSystemdExecArgs (
|
ExecStart = utils.escapeSystemdExecArgs (
|
||||||
[
|
[
|
||||||
(lib.getExe' cfg.backendPackage "gunicorn")
|
(lib.getExe' cfg.backendPackage "gunicorn")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue