|
20 | 20 | type = types.str; |
21 | 21 | default = "git.${toString config.networking.fqdn}"; |
22 | 22 | defaultText = "git.\${toString config.networking.fqdn}"; |
| 23 | + description = '' |
| 24 | + The primary domain name for this service. |
| 25 | + Used for virtual host configuration, TLS certificates, and service URLs. |
| 26 | + ''; |
| 27 | + }; |
| 28 | + internal_port = mkOption { |
| 29 | + type = types.port; |
| 30 | + description = '' |
| 31 | + The local port the service listens on. |
| 32 | + ''; |
23 | 33 | }; |
24 | | - internal_port = mkOption { type = types.port; }; |
25 | 34 | useLocalDatabase = mkOption { |
26 | 35 | type = types.bool; |
27 | 36 | default = true; |
| 37 | + description = '' |
| 38 | + Whether to use a local database instance for this service. |
| 39 | + When enabled (default), the service will deploy and manage |
| 40 | + its own postgres database. When disabled, you must configure external |
| 41 | + database connection parameters separately. |
| 42 | + ''; |
28 | 43 | }; |
29 | 44 | smtp = { |
30 | 45 | hostname = mkOption { |
31 | 46 | type = types.nullOr types.str; |
32 | 47 | default = null; |
| 48 | + example = "mail.secshell.net"; |
| 49 | + description = '' |
| 50 | + SMTP server hostname for outgoing email. |
| 51 | + Leave null to disable email functionality. |
| 52 | + ''; |
33 | 53 | }; |
34 | 54 | from = mkOption { |
35 | 55 | type = types.nullOr types.str; |
36 | 56 | default = null; |
| 57 | + |
| 58 | + description = '' |
| 59 | + The email address shown as the sender in outgoing emails. |
| 60 | +
|
| 61 | + Important: When this doesn't match the SMTP service account's email address, |
| 62 | + you must configure your mailserver to allow sending from this address (alias or sender rewriting) |
| 63 | + ''; |
37 | 64 | }; |
38 | 65 | port = mkOption { |
39 | 66 | type = types.port; |
40 | 67 | default = 587; |
| 68 | + example = 465; |
| 69 | + description = '' |
| 70 | + SMTP server port. STARTTLS uses 587, TLS uses 465 by default. |
| 71 | + ''; |
41 | 72 | }; |
42 | 73 | user = mkOption { |
43 | 74 | type = types.nullOr types.str; |
44 | 75 | default = null; |
| 76 | + description = '' |
| 77 | + SMTP authentication username. |
| 78 | + Typically the full email address of the service account which is being used to send mails.. |
| 79 | + ''; |
45 | 80 | }; |
46 | 81 | noReplyAddress = mkOption { |
47 | 82 | type = types.nullOr types.str; |
48 | 83 | default = config.secshell.gitea.from; |
49 | 84 | defaultText = "config.secshell.gitea.from"; |
| 85 | + |
| 86 | + description = '' |
| 87 | + "From" address for automated/non-reply emails. |
| 88 | + ''; |
50 | 89 | }; |
51 | 90 | }; |
52 | 91 | database = { |
53 | 92 | hostname = mkOption { |
54 | 93 | type = types.str; |
55 | 94 | default = ""; |
| 95 | + description = '' |
| 96 | + Database server hostname. Not required if local database is being used. |
| 97 | + ''; |
56 | 98 | }; |
57 | 99 | username = mkOption { |
58 | 100 | type = types.str; |
59 | 101 | default = "gitea"; |
| 102 | + description = '' |
| 103 | + Database user account with read/write privileges. |
| 104 | + For PostgreSQL, ensure the user has CREATEDB permission |
| 105 | + for initial setup if creating databases automatically. |
| 106 | + ''; |
60 | 107 | }; |
61 | 108 | name = mkOption { |
62 | 109 | type = types.str; |
63 | 110 | default = "gitea"; |
| 111 | + description = '' |
| 112 | + Name of the database to use. |
| 113 | + Will be created automatically if the user has permissions. |
| 114 | + ''; |
64 | 115 | }; |
65 | 116 | }; |
66 | 117 | appName = mkOption { |
67 | 118 | type = types.str; |
68 | 119 | default = "Secure Shell Networks: Gitea"; |
| 120 | + description = '' |
| 121 | + The application name of the gitea instance. |
| 122 | + ''; |
69 | 123 | }; |
70 | 124 | sshPort = mkOption { |
71 | 125 | type = types.port; |
|
74 | 128 | requireSignInView = mkOption { |
75 | 129 | type = types.bool; |
76 | 130 | default = true; |
| 131 | + description = '' |
| 132 | + Enable this to force users to log in to view any page or to use API. |
| 133 | + It could be set to "expensive" to block anonymous users accessing some |
| 134 | + pages which consume a lot of resources, for example: block anonymous AI |
| 135 | + crawlers from accessing repo code pages. The "expensive" mode is experimental |
| 136 | + and subject to change. |
| 137 | + ''; |
77 | 138 | }; |
78 | 139 | enableNotifyMail = mkOption { |
79 | 140 | type = types.bool; |
80 | 141 | default = true; |
| 142 | + description = '' |
| 143 | + Enable this to send e-mail to watchers of a repository when something happens, |
| 144 | + like creating issues. Requires Mailer to be enabled. |
| 145 | + ''; |
81 | 146 | }; |
82 | 147 | allowOnlyExternalRegistrations = mkOption { |
83 | 148 | type = types.bool; |
84 | 149 | default = true; |
| 150 | + description = '' |
| 151 | + Set to true to force registration only using third-party services. |
| 152 | + ''; |
85 | 153 | }; |
86 | 154 | defaultKeepEmailPrivate = mkOption { |
87 | 155 | type = types.bool; |
88 | 156 | default = true; |
| 157 | + description = "By default set users to keep their email address private."; |
89 | 158 | }; |
90 | 159 | }; |
91 | 160 |
|
|
0 commit comments