| { pkgs, config, ... }: { |
| services.frappe = { |
| enable = true; |
| project = "frappe"; |
| |
| package = pkgs.frappix.frappe; |
| |
| apps = [ |
| (pkgs.frappix.erpnext.overrideAttrs (oldAttrs: { |
| src = pkgs.mkAssets (pkgs.frappix.appSources.wiki // { |
| src = builtins.fetchTree { |
| type = "git"; |
| url = "https://git.clicks.codes/Clicks/Forks/ERPNext"; |
| narHash = "sha256-epjhNJugFQTTdoR6Ac0qD+pntCDmiS+spZV6XIt+60M="; |
| rev = "f07bbd8cbb744c0b3ab85b47c1f0bc42a9265f9d"; |
| shallow = true; |
| }; |
| }); |
| })) |
| pkgs.frappix.wiki |
| ]; |
| |
| sites."frappe.clicks.codes" = { |
| domains = [ |
| "frappe.clicks.codes" |
| ]; |
| |
| apps = [ |
| "frappe" |
| "wiki" |
| "erpnext" |
| ]; |
| }; |
| |
| sites."staging.frappe.clicks.codes" = { |
| domains = [ |
| "staging.frappe.clicks.codes" |
| ]; |
| |
| apps = [ |
| "frappe" |
| "wiki" |
| "erpnext" |
| ]; |
| }; |
| |
| adminPassword = config.sops.secrets."modules/common/frappe.nix:adminPassword".path; |
| |
| gunicorn_workers = 9; |
| }; |
| |
| services.nginx.virtualHosts."frappe.clicks.codes" = { |
| enableACME = true; |
| }; |
| |
| services.nginx.virtualHosts."staging.frappe.clicks.codes" = { |
| enableACME = true; |
| }; |
| |
| sops.secrets."modules/common/frappe.nix:adminPassword" = { |
| mode = "0400"; |
| owner = config.users.users.root.name; |
| group = config.users.users.root.group; |
| sopsFile = ../../secrets/frappe.json; |
| format = "json"; |
| key = "adminPassword"; |
| }; |
| } |