nixos-module/invoiceninja.nix: changed nixos module definition for nginx to allow local development, removed unneeded link in data setup service
This commit is contained in:
parent
730715014e
commit
611709cb62
@ -1,10 +1,9 @@
|
|||||||
{
|
{ config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, modulesPath
|
||||||
modulesPath,
|
, options
|
||||||
options,
|
, pkgs
|
||||||
pkgs,
|
, ...
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -485,7 +484,7 @@ in
|
|||||||
services.nginx = lib.mkIf (cfg.proxy.server == "nginx") {
|
services.nginx = lib.mkIf (cfg.proxy.server == "nginx") {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = (if (cfg.hostname == "localhost") then false else true);
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
recommendedOptimisation = true;
|
recommendedOptimisation = true;
|
||||||
@ -496,8 +495,8 @@ in
|
|||||||
cfg.proxy.nginxConfig
|
cfg.proxy.nginxConfig
|
||||||
{
|
{
|
||||||
root = lib.mkForce "${invoiceninja}/public";
|
root = lib.mkForce "${invoiceninja}/public";
|
||||||
addSSL = lib.mkForce true;
|
addSSL = lib.mkForce (if (cfg.hostname == "localhost") then false else true);
|
||||||
enableACME = lib.mkForce true;
|
enableACME = lib.mkForce (if (cfg.hostname == "localhost") then false else true);
|
||||||
locations = {
|
locations = {
|
||||||
"/".tryFiles = "$uri $uri/ /index.php?$query_string";
|
"/".tryFiles = "$uri $uri/ /index.php?$query_string";
|
||||||
"/".extraConfig = ''
|
"/".extraConfig = ''
|
||||||
@ -655,9 +654,6 @@ in
|
|||||||
# Link the static storage (package provided) to the runtime storage
|
# Link the static storage (package provided) to the runtime storage
|
||||||
rsync -av --no-perms ${invoiceninja}/storage-static/ ${cfg.dataDir}/storage
|
rsync -av --no-perms ${invoiceninja}/storage-static/ ${cfg.dataDir}/storage
|
||||||
|
|
||||||
# Link the static vendor/bin (package provided) to the runtime vendor/bin
|
|
||||||
rsync -av --no-perms ${invoiceninja}/vendor/bin-static/ ${cfg.dataDir}/vendor/bin
|
|
||||||
|
|
||||||
# Link the app.php in the runtime folder.
|
# Link the app.php in the runtime folder.
|
||||||
# We cannot link the cache folder only because bootstrap folder needs to be writeable.
|
# We cannot link the cache folder only because bootstrap folder needs to be writeable.
|
||||||
ln -sf ${invoiceninja}/bootstrap-static/app.php ${cfg.runtimeDir}/app.php
|
ln -sf ${invoiceninja}/bootstrap-static/app.php ${cfg.runtimeDir}/app.php
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user