blob: f6128f9adb1317b0ab913ec2e60042db8cc615a0 [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 = [
9 pkgs.frappix.erpnext
Skyler Grey8720ed12024-03-10 13:59:44 +000010 pkgs.frappix.wiki
Skyler Greyfc048592024-03-10 13:46:17 +000011 ];
12
13 sites."frappe.clicks.codes" = {
14 domains = [
15 "frappe.clicks.codes"
16 ];
17
18 apps = [
19 "frappe"
Skyler Grey8720ed12024-03-10 13:59:44 +000020 "wiki"
Skyler Greyfc048592024-03-10 13:46:17 +000021 "erpnext"
22 ];
23 };
24
Skyler Grey9781aec2024-04-18 10:38:49 +000025 sites."staging.frappe.clicks.codes" = {
26 domains = [
27 "staging.frappe.clicks.codes"
28 ];
29
30 apps = [
31 "frappe"
32 "wiki"
33 "erpnext"
34 ];
35 };
36
Skyler Greyfc048592024-03-10 13:46:17 +000037 adminPassword = config.sops.secrets."modules/common/frappe.nix:adminPassword".path;
38
39 gunicorn_workers = 9;
40 };
41
42 services.nginx.virtualHosts."frappe.clicks.codes" = {
43 enableACME = true;
44 };
45
Skyler Grey9781aec2024-04-18 10:38:49 +000046 services.nginx.virtualHosts."staging.frappe.clicks.codes" = {
47 enableACME = true;
48 };
49
Skyler Greyfc048592024-03-10 13:46:17 +000050 sops.secrets."modules/common/frappe.nix:adminPassword" = {
51 mode = "0400";
52 owner = config.users.users.root.name;
53 group = config.users.users.root.group;
54 sopsFile = ../../secrets/frappe.json;
55 format = "json";
56 key = "adminPassword";
57 };
58}