Compare commits
2 Commits
730715014e
...
7b2072e5b0
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b2072e5b0 | |||
| 611709cb62 |
56
flake.lock
generated
56
flake.lock
generated
@ -3,11 +3,11 @@
|
|||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1733328505,
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -24,11 +24,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719994518,
|
"lastModified": 1733312601,
|
||||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -55,11 +55,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1721042469,
|
"lastModified": 1734279981,
|
||||||
"narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=",
|
"narHash": "sha256-NdaCraHPp8iYMWzdXAt5Nv6sA3MUzlCiGiR586TCwo0=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "f451c19376071a90d8c58ab1a953c6e9840527fd",
|
"rev": "aa9f40c906904ebd83da78e7f328cd8aeaeae785",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -68,39 +68,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"libgit2": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1715853528,
|
|
||||||
"narHash": "sha256-J2rCxTecyLbbDdsyBWn9w7r3pbKRMkI9E7RvRgAqBdY=",
|
|
||||||
"owner": "libgit2",
|
|
||||||
"repo": "libgit2",
|
|
||||||
"rev": "36f7e21ad757a3dacc58cf7944329da6bc1d6e96",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "libgit2",
|
|
||||||
"ref": "v1.8.1",
|
|
||||||
"repo": "libgit2",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix": {
|
"nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"git-hooks-nix": "git-hooks-nix",
|
"git-hooks-nix": "git-hooks-nix",
|
||||||
"libgit2": "libgit2",
|
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-23-11": "nixpkgs-23-11",
|
"nixpkgs-23-11": "nixpkgs-23-11",
|
||||||
"nixpkgs-regression": "nixpkgs-regression"
|
"nixpkgs-regression": "nixpkgs-regression"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735586022,
|
"lastModified": 1735834256,
|
||||||
"narHash": "sha256-17Wosqogo+6QMddJ8qo5C9NZug8QRuFO59KyTP/XfFw=",
|
"narHash": "sha256-cSQSHdsCEvkkX3i3YfyC+ze1Jk60+cT7ySY+J31hODU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nix",
|
"repo": "nix",
|
||||||
"rev": "61c3559116f0dccdd0c69cb35f411f2d6016c41a",
|
"rev": "442a2623e48357ff72c77bb11cf2cf06d94d2f90",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -110,16 +92,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723688146,
|
"lastModified": 1734359947,
|
||||||
"narHash": "sha256-sqLwJcHYeWLOeP/XoLwAtYjr01TISlkOfz+NG82pbdg=",
|
"narHash": "sha256-1Noao/H+N8nFB4Beoy8fgwrcOQLVm9o4zKW1ODaqK9E=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c3d4ac725177c030b1e289015989da2ad9d56af0",
|
"rev": "48d12d5e70ee91fe8481378e540433a7303dbf6a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-24.05",
|
"ref": "release-24.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -158,11 +140,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735531152,
|
"lastModified": 1735669367,
|
||||||
"narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=",
|
"narHash": "sha256-tfYRbFhMOnYaM4ippqqid3BaLOXoFNdImrfBfCp4zn0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b",
|
"rev": "edf04b75c13c2ac0e54df5ec5c543e300f76f1c9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -37,13 +37,11 @@ php.buildComposerProject (finalAttrs: {
|
|||||||
# Move static contents for the NixOS module to pick it up, if needed.
|
# Move static contents for the NixOS module to pick it up, if needed.
|
||||||
mv $out/bootstrap $out/bootstrap-static
|
mv $out/bootstrap $out/bootstrap-static
|
||||||
mv $out/storage $out/storage-static
|
mv $out/storage $out/storage-static
|
||||||
mv $out/vendor/bin $out/vendor/bin-static
|
|
||||||
|
|
||||||
# Link NixOS module files to derivation output
|
# Link NixOS module files to derivation output
|
||||||
ln -s ${dataDir}/.env $out/.env
|
ln -s ${dataDir}/.env $out/.env
|
||||||
ln -s ${dataDir}/storage $out/
|
ln -s ${dataDir}/storage $out/
|
||||||
ln -s ${dataDir}/storage/app/public $out/public/storage
|
ln -s ${dataDir}/storage/app/public $out/public/storage
|
||||||
ln -s ${dataDir}/vendor/bin $out/vendor
|
|
||||||
ln -s ${runtimeDir} $out/bootstrap
|
ln -s ${runtimeDir} $out/bootstrap
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user