old
1{config, ...}: {
2 services.artalk = {
3 enable = true;
4 settings = {
5 host = "127.0.0.1";
6 port = 23366;
7 app_key = {_secret = config.sops.secrets.artalk-app-key.path;};
8 debug = false;
9 locale = "zh-CN";
10 timezone = "Asia/Shanghai";
11 login_timeout = 259200;
12 db = {
13 type = "sqlite";
14 file = "./data/artalk.db";
15 user = "artalk";
16 charset = "utf8mb4";
17 };
18 log = {
19 enabled = true;
20 filename = "./data/artalk.log";
21 };
22 trusted_domains = [
23 "https://blog.hpcesia.com"
24 ];
25 moderator = {
26 pending_default = true;
27 api_fail_block = true;
28 akismet_key = {_secret = config.sops.secrets.artalk-akismet-key.path;};
29 };
30 captcha = {
31 enabled = true;
32 captcha_type = "image";
33 };
34 img_upload.enable = false;
35 email = {
36 enabled = true;
37 send_type = "smtp";
38 send_name = "{{reply_nick}}";
39 send_addr = "info@hpcesia.com";
40 mail_subject = "[{{site_name}}] 您收到了来自 @{{reply_nick}} 的回复";
41 mail_tpl = "default";
42 smtp = {
43 host = "glacier.mxrouting.net";
44 port = 465;
45 username = "info@hpcesia.com";
46 password = {_secret = config.sops.secrets.artalk-email-password.path;};
47 };
48 };
49 admin_notify = {
50 notify_tpl = "default";
51 notify_pending = true;
52 email = {
53 enabled = true;
54 mail_subject = "[{{site_name}}] 您的文章「{{page_title}}」有新回复";
55 };
56 };
57 auth = {
58 enabled = true;
59 anonymous = true;
60 callback = "https://artalk.hpcesia.com/api/v2/auth/{provider}/callback";
61 email = {
62 enabled = true;
63 verify_subject = "您的验证码是 - {{code}}";
64 verify_tpl = "default";
65 };
66 github = {
67 enabled = true;
68 client_id = {_secret = config.sops.secrets.artalk-github-client-id.path;};
69 client_secret = {_secret = config.sops.secrets.artalk-github-client-secret.path;};
70 };
71 };
72 frontend = {
73 placeholder = "来都来了,不如说点什么吧!";
74 emoticons = "https://blog.hpcesia.com/assets/emotion.json";
75 gravatar = {
76 mirror = "https://weavatar.com/avatar/";
77 params = "sha256=1&d=mp&s=240";
78 };
79 imgLazyLoad = "native";
80 versionCheck = false;
81 };
82 };
83 };
84}