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-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": 1740432616,
|
||||||
"narHash": "sha256-17Wosqogo+6QMddJ8qo5C9NZug8QRuFO59KyTP/XfFw=",
|
"narHash": "sha256-2yad3RqbLhCeMK01lpSLXmeZR7J74YeBg4yNAqhzLLk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nix",
|
"repo": "nix",
|
||||||
"rev": "61c3559116f0dccdd0c69cb35f411f2d6016c41a",
|
"rev": "8384e41b7608b5ff50306d3dec6171483cf2d4cd",
|
||||||
"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": 1740339700,
|
||||||
"narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=",
|
"narHash": "sha256-cbrw7EgQhcdFnu6iS3vane53bEagZQy/xyIkDWpCgVE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b",
|
"rev": "04ef94c4c1582fd485bbfdb8c4a8ba250e359195",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
modules = [ ./tests ];
|
modules = [ ./tests ];
|
||||||
};
|
};
|
||||||
|
|
||||||
overlays.default = final: prev: { invoice-ninja = final.callPackage ./package.nix { }; };
|
overlays.default = final: prev: { invoiceninja = final.callPackage ./package.nix { }; };
|
||||||
|
|
||||||
packages = forEachSystem (system: {
|
packages = forEachSystem (system: {
|
||||||
invoiceninja = pkgsBySystem.${system}.invoiceninja;
|
invoiceninja = pkgsBySystem.${system}.invoiceninja;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -9,16 +9,16 @@
|
|||||||
|
|
||||||
php.buildComposerProject (finalAttrs: {
|
php.buildComposerProject (finalAttrs: {
|
||||||
pname = "invoiceninja";
|
pname = "invoiceninja";
|
||||||
version = "5.11.7";
|
version = "5.12.13";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "invoiceninja";
|
owner = "invoiceninja";
|
||||||
repo = "invoiceninja";
|
repo = "invoiceninja";
|
||||||
rev = "v${finalAttrs.version}";
|
rev = "v${finalAttrs.version}";
|
||||||
hash = "sha256-wfKYe31ZulXJfbY5naFipXUhP0W6KUYbaoMuiV8DTas=";
|
hash = "sha256-/+dmZUxDeC33bBuM2oZwU9wOVtJY0X5/dkhlpbfLkYg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorHash = "sha256-RA7IkPXz1HdqQAyB/VIbYg3BmCnlJKLxIVtODIRmZxg=";
|
vendorHash = "sha256-NzFOh3XpKC3Ia1Ns9I6xN9N6y1F5dFSEk7bxq/eKZIc=";
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./disable-react-for-admin.patch
|
./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.
|
# 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
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
../nixos-module/invoice-ninja.nix
|
../nixos-module/invoiceninja.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
initialPassword = "test";
|
initialPassword = "test";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.invoice-ninja = {
|
services.invoiceninja = {
|
||||||
enable = true;
|
enable = true;
|
||||||
proxy.server = "caddy";
|
proxy.server = "caddy";
|
||||||
adminAccount.passwordFile = ./invoice_ninja_test_password;
|
adminAccount.passwordFile = ./invoice_ninja_test_password;
|
||||||
|
|||||||
Reference in New Issue
Block a user