Compare commits
9 Commits
8549d2f23d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| a42d01edd3 | |||
| 1df11adbde | |||
| e8b208accb | |||
| 295b299fdd | |||
| d898e26cb1 | |||
| 7b2072e5b0 | |||
| 611709cb62 | |||
| 730715014e | |||
| 4bddba21da |
56
flake.lock
generated
56
flake.lock
generated
@@ -3,11 +3,11 @@
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"lastModified": 1733328505,
|
||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -24,11 +24,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -55,11 +55,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721042469,
|
||||
"narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=",
|
||||
"lastModified": 1734279981,
|
||||
"narHash": "sha256-NdaCraHPp8iYMWzdXAt5Nv6sA3MUzlCiGiR586TCwo0=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "f451c19376071a90d8c58ab1a953c6e9840527fd",
|
||||
"rev": "aa9f40c906904ebd83da78e7f328cd8aeaeae785",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -68,39 +68,21 @@
|
||||
"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": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts",
|
||||
"git-hooks-nix": "git-hooks-nix",
|
||||
"libgit2": "libgit2",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-23-11": "nixpkgs-23-11",
|
||||
"nixpkgs-regression": "nixpkgs-regression"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735586022,
|
||||
"narHash": "sha256-17Wosqogo+6QMddJ8qo5C9NZug8QRuFO59KyTP/XfFw=",
|
||||
"lastModified": 1740432616,
|
||||
"narHash": "sha256-2yad3RqbLhCeMK01lpSLXmeZR7J74YeBg4yNAqhzLLk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nix",
|
||||
"rev": "61c3559116f0dccdd0c69cb35f411f2d6016c41a",
|
||||
"rev": "8384e41b7608b5ff50306d3dec6171483cf2d4cd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -110,16 +92,16 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1723688146,
|
||||
"narHash": "sha256-sqLwJcHYeWLOeP/XoLwAtYjr01TISlkOfz+NG82pbdg=",
|
||||
"lastModified": 1734359947,
|
||||
"narHash": "sha256-1Noao/H+N8nFB4Beoy8fgwrcOQLVm9o4zKW1ODaqK9E=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c3d4ac725177c030b1e289015989da2ad9d56af0",
|
||||
"rev": "48d12d5e70ee91fe8481378e540433a7303dbf6a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"ref": "release-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -158,11 +140,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1735531152,
|
||||
"narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=",
|
||||
"lastModified": 1740339700,
|
||||
"narHash": "sha256-cbrw7EgQhcdFnu6iS3vane53bEagZQy/xyIkDWpCgVE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b",
|
||||
"rev": "04ef94c4c1582fd485bbfdb8c4a8ba250e359195",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
modules = [ ./tests ];
|
||||
};
|
||||
|
||||
overlays.default = final: prev: { invoice-ninja = final.callPackage ./package.nix { }; };
|
||||
overlays.default = final: prev: { invoiceninja = final.callPackage ./package.nix { }; };
|
||||
|
||||
packages = forEachSystem (system: {
|
||||
invoiceninja = pkgsBySystem.${system}.invoiceninja;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
{ config
|
||||
, lib
|
||||
, modulesPath
|
||||
, options
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -485,7 +484,7 @@ in
|
||||
services.nginx = lib.mkIf (cfg.proxy.server == "nginx") {
|
||||
enable = true;
|
||||
|
||||
recommendedTlsSettings = true;
|
||||
recommendedTlsSettings = (if (cfg.hostname == "localhost") then false else true);
|
||||
recommendedGzipSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedOptimisation = true;
|
||||
@@ -496,8 +495,8 @@ in
|
||||
cfg.proxy.nginxConfig
|
||||
{
|
||||
root = lib.mkForce "${invoiceninja}/public";
|
||||
addSSL = lib.mkForce true;
|
||||
enableACME = lib.mkForce true;
|
||||
addSSL = lib.mkForce (if (cfg.hostname == "localhost") then false else true);
|
||||
enableACME = lib.mkForce (if (cfg.hostname == "localhost") then false else true);
|
||||
locations = {
|
||||
"/".tryFiles = "$uri $uri/ /index.php?$query_string";
|
||||
"/".extraConfig = ''
|
||||
@@ -655,9 +654,6 @@ in
|
||||
# Link the static storage (package provided) to the runtime 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.
|
||||
# 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
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
|
||||
php.buildComposerProject (finalAttrs: {
|
||||
pname = "invoiceninja";
|
||||
version = "5.11.7";
|
||||
version = "5.12.13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "invoiceninja";
|
||||
repo = "invoiceninja";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-wfKYe31ZulXJfbY5naFipXUhP0W6KUYbaoMuiV8DTas=";
|
||||
hash = "sha256-/+dmZUxDeC33bBuM2oZwU9wOVtJY0X5/dkhlpbfLkYg=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-RA7IkPXz1HdqQAyB/VIbYg3BmCnlJKLxIVtODIRmZxg=";
|
||||
vendorHash = "sha256-NzFOh3XpKC3Ia1Ns9I6xN9N6y1F5dFSEk7bxq/eKZIc=";
|
||||
|
||||
patches = [
|
||||
./disable-react-for-admin.patch
|
||||
@@ -37,13 +37,11 @@ php.buildComposerProject (finalAttrs: {
|
||||
# Move static contents for the NixOS module to pick it up, if needed.
|
||||
mv $out/bootstrap $out/bootstrap-static
|
||||
mv $out/storage $out/storage-static
|
||||
mv $out/vendor/bin $out/vendor/bin-static
|
||||
|
||||
# Link NixOS module files to derivation output
|
||||
ln -s ${dataDir}/.env $out/.env
|
||||
ln -s ${dataDir}/storage $out/
|
||||
ln -s ${dataDir}/storage/app/public $out/public/storage
|
||||
ln -s ${dataDir}/vendor/bin $out/vendor
|
||||
ln -s ${runtimeDir} $out/bootstrap
|
||||
'';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
../nixos-module/invoice-ninja.nix
|
||||
../nixos-module/invoiceninja.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
@@ -16,7 +16,7 @@
|
||||
initialPassword = "test";
|
||||
};
|
||||
|
||||
services.invoice-ninja = {
|
||||
services.invoiceninja = {
|
||||
enable = true;
|
||||
proxy.server = "caddy";
|
||||
adminAccount.passwordFile = ./invoice_ninja_test_password;
|
||||
|
||||
Reference in New Issue
Block a user