Skyler Grey | fc04859 | 2024-03-10 13:46:17 +0000 | [diff] [blame] | 1 | { pkgs, config, ... }: { |
| 2 | services.frappe = { |
| 3 | enable = true; |
| 4 | project = "frappe"; |
| 5 | |
| 6 | package = pkgs.frappix.frappe; |
| 7 | |
| 8 | apps = [ |
Skyler Grey | 9cb5f60 | 2024-04-24 00:53:25 +0000 | [diff] [blame] | 9 | (pkgs.frappix.erpnext.overrideAttrs (oldAttrs: { |
| 10 | src = pkgs.mkAssets (pkgs.frappix.appSources.wiki // { |
| 11 | src = builtins.fetchTree { |
| 12 | type = "git"; |
| 13 | url = "https://git.clicks.codes/Clicks/Forks/ERPNext"; |
| 14 | narHash = "sha256-epjhNJugFQTTdoR6Ac0qD+pntCDmiS+spZV6XIt+60M="; |
| 15 | rev = "f07bbd8cbb744c0b3ab85b47c1f0bc42a9265f9d"; |
| 16 | shallow = true; |
| 17 | }; |
| 18 | }); |
| 19 | })) |
Skyler Grey | 8720ed1 | 2024-03-10 13:59:44 +0000 | [diff] [blame] | 20 | pkgs.frappix.wiki |
Skyler Grey | fc04859 | 2024-03-10 13:46:17 +0000 | [diff] [blame] | 21 | ]; |
| 22 | |
| 23 | sites."frappe.clicks.codes" = { |
| 24 | domains = [ |
| 25 | "frappe.clicks.codes" |
| 26 | ]; |
| 27 | |
| 28 | apps = [ |
| 29 | "frappe" |
Skyler Grey | 8720ed1 | 2024-03-10 13:59:44 +0000 | [diff] [blame] | 30 | "wiki" |
Skyler Grey | fc04859 | 2024-03-10 13:46:17 +0000 | [diff] [blame] | 31 | "erpnext" |
| 32 | ]; |
| 33 | }; |
| 34 | |
Skyler Grey | 9781aec | 2024-04-18 10:38:49 +0000 | [diff] [blame] | 35 | sites."staging.frappe.clicks.codes" = { |
| 36 | domains = [ |
| 37 | "staging.frappe.clicks.codes" |
| 38 | ]; |
| 39 | |
| 40 | apps = [ |
| 41 | "frappe" |
| 42 | "wiki" |
| 43 | "erpnext" |
| 44 | ]; |
| 45 | }; |
| 46 | |
Skyler Grey | fc04859 | 2024-03-10 13:46:17 +0000 | [diff] [blame] | 47 | adminPassword = config.sops.secrets."modules/common/frappe.nix:adminPassword".path; |
| 48 | |
| 49 | gunicorn_workers = 9; |
| 50 | }; |
| 51 | |
| 52 | services.nginx.virtualHosts."frappe.clicks.codes" = { |
| 53 | enableACME = true; |
| 54 | }; |
| 55 | |
Skyler Grey | 9781aec | 2024-04-18 10:38:49 +0000 | [diff] [blame] | 56 | services.nginx.virtualHosts."staging.frappe.clicks.codes" = { |
| 57 | enableACME = true; |
| 58 | }; |
| 59 | |
Skyler Grey | fc04859 | 2024-03-10 13:46:17 +0000 | [diff] [blame] | 60 | sops.secrets."modules/common/frappe.nix:adminPassword" = { |
| 61 | mode = "0400"; |
| 62 | owner = config.users.users.root.name; |
| 63 | group = config.users.users.root.group; |
| 64 | sopsFile = ../../secrets/frappe.json; |
| 65 | format = "json"; |
| 66 | key = "adminPassword"; |
| 67 | }; |
| 68 | } |