diff --git a/tests/default.nix b/tests/default.nix new file mode 100644 index 0000000..ef4757a --- /dev/null +++ b/tests/default.nix @@ -0,0 +1,27 @@ +{ modulesPath, ... }: + +{ + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + + nixpkgs.config.allowUnfree = true; + + users.users.test = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + initialPassword = "test"; + }; + + services.invoice-ninja = { + enable = true; + proxy.server = "caddy"; + adminAccount.passwordFile = .invoice_ninja_test_password; + secretFile = ./test.env; + }; + + networking.firewall.enable = false; + + services.resolved.enable = true; +} + diff --git a/tests/invoice_ninja_test_password b/tests/invoice_ninja_test_password new file mode 100644 index 0000000..f3097ab --- /dev/null +++ b/tests/invoice_ninja_test_password @@ -0,0 +1 @@ +password diff --git a/tests/test.env b/tests/test.env new file mode 100644 index 0000000..e82a373 --- /dev/null +++ b/tests/test.env @@ -0,0 +1,2 @@ +APP_KEY=base64:gJnNI8pOx4c0/Z6kl9mIjn0X9XkbJUWjtqnDFl9prvo= +API_KEY=test-api-token