blob: b26d606d644e78e5d90f68c3aa0ad15e225c9b04 [file] [log] [blame]
Skyler Greyfc048592024-03-10 13:46:17 +00001{ pkgs, config, ... }: {
2 services.frappe = {
3 enable = true;
4 project = "frappe";
5
6 package = pkgs.frappix.frappe;
7
8 apps = [
Skyler Grey9cb5f602024-04-24 00:53:25 +00009 (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 Grey8720ed12024-03-10 13:59:44 +000020 pkgs.frappix.wiki
Skyler Greyfc048592024-03-10 13:46:17 +000021 ];
22
23 sites."frappe.clicks.codes" = {
24 domains = [
25 "frappe.clicks.codes"
26 ];
27
28 apps = [
29 "frappe"
Skyler Grey8720ed12024-03-10 13:59:44 +000030 "wiki"
Skyler Greyfc048592024-03-10 13:46:17 +000031 "erpnext"
32 ];
33 };
34
Skyler Grey9781aec2024-04-18 10:38:49 +000035 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 Greyfc048592024-03-10 13:46:17 +000047 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 Grey9781aec2024-04-18 10:38:49 +000056 services.nginx.virtualHosts."staging.frappe.clicks.codes" = {
57 enableACME = true;
58 };
59
Skyler Greyfc048592024-03-10 13:46:17 +000060 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}