diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2026-06-01 15:46:21 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2026-06-01 15:46:21 +0900 |
| commit | adbee8d605d2e7c4b6ea1fd3d0c8b4e878289c75 (patch) | |
| tree | b467fd434cd11d4fb631d551df9ccc1f151a6dbc /doc | |
| parent | e8ac9c3c3aee52866c8c48dc0aacccb27fc88d5a (diff) | |
Revert "services: Add forgejo-service-type."
This reverts commit e8ac9c3c3aee52866c8c48dc0aacccb27fc88d5a, pushed by mistake.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/guix.texi | 319 |
1 files changed, 0 insertions, 319 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 4d28f7c4aab..f5efd34024e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -429,7 +429,6 @@ Services | |||
| 429 | * Desktop Services:: D-Bus and desktop services. | 429 | * Desktop Services:: D-Bus and desktop services. |
| 430 | * Sound Services:: ALSA and Pulseaudio services. | 430 | * Sound Services:: ALSA and Pulseaudio services. |
| 431 | * File Search Services:: Tools to search for files. | 431 | * File Search Services:: Tools to search for files. |
| 432 | * Forge Services:: Hosting your own software forge. | ||
| 433 | * Database Services:: SQL databases, key-value stores, etc. | 432 | * Database Services:: SQL databases, key-value stores, etc. |
| 434 | * Mail Services:: IMAP, POP3, SMTP, and all that. | 433 | * Mail Services:: IMAP, POP3, SMTP, and all that. |
| 435 | * Messaging Services:: Messaging services. | 434 | * Messaging Services:: Messaging services. |
| @@ -20359,7 +20358,6 @@ declaration. | |||
| 20359 | * Desktop Services:: D-Bus and desktop services. | 20358 | * Desktop Services:: D-Bus and desktop services. |
| 20360 | * Sound Services:: ALSA and Pulseaudio services. | 20359 | * Sound Services:: ALSA and Pulseaudio services. |
| 20361 | * File Search Services:: Tools to search for files. | 20360 | * File Search Services:: Tools to search for files. |
| 20362 | * Forge Services:: Hosting your own software forge. | ||
| 20363 | * Database Services:: SQL databases, key-value stores, etc. | 20361 | * Database Services:: SQL databases, key-value stores, etc. |
| 20364 | * Mail Services:: IMAP, POP3, SMTP, and all that. | 20362 | * Mail Services:: IMAP, POP3, SMTP, and all that. |
| 20365 | * Messaging Services:: Messaging services. | 20363 | * Messaging Services:: Messaging services. |
| @@ -28760,323 +28758,6 @@ G-exp denoting the channels to use when updating the database | |||
| 28760 | @end table | 28758 | @end table |
| 28761 | @end deftp | 28759 | @end deftp |
| 28762 | 28760 | ||
| 28763 | @node Forge Services | ||
| 28764 | @subsection Forge Services | ||
| 28765 | |||
| 28766 | Forges are applications designed to ease collaboration on software | ||
| 28767 | development. Their usual features include an issue tracker, code | ||
| 28768 | versioning and a system to request and conduct change reviews. | ||
| 28769 | |||
| 28770 | @cindex software forge, self-hosting | ||
| 28771 | @cindex forgejo, software forge | ||
| 28772 | @subsubheading Forgejo | ||
| 28773 | |||
| 28774 | This is the service for running Forgejo (@url{https://forgejo.org/}). | ||
| 28775 | It is provided via the @code{(gnu services forgejo)} module. | ||
| 28776 | |||
| 28777 | @defvar forgejo-service-type | ||
| 28778 | The service type for the Forgejo source forge. It takes a | ||
| 28779 | @code{forgejo-configuration} object as a value, documented below. In | ||
| 28780 | its simplest form, a Forgejo service can be defined as just: | ||
| 28781 | |||
| 28782 | @lisp | ||
| 28783 | (service forgejo-service-type) | ||
| 28784 | @end lisp | ||
| 28785 | |||
| 28786 | Here's a slightly more involved service configuration, intended as a | ||
| 28787 | secure, private software forge that is able to send notification emails. | ||
| 28788 | |||
| 28789 | @lisp | ||
| 28790 | (service forgejo-service-type | ||
| 28791 | (forgejo-configuration | ||
| 28792 | (offline-mode? #t) | ||
| 28793 | (require-signin-to-view? #t) | ||
| 28794 | (http-address "10.1.1.1") ;exposed via wireguard | ||
| 28795 | (ssh-address "10.1.1.1") | ||
| 28796 | (mailer? #t) | ||
| 28797 | (mail-from "some-email@@example.com") | ||
| 28798 | (smtp-address "smtp.example.com") | ||
| 28799 | (smtp-user "some-email@@example.com") | ||
| 28800 | (smtp-password-file "/etc/forgejo/smtp_secret") | ||
| 28801 | (mail-notification? #t))) | ||
| 28802 | @end lisp | ||
| 28803 | @end defvar | ||
| 28804 | |||
| 28805 | Below is the documentation for the @code{forgejo-configuration} record: | ||
| 28806 | |||
| 28807 | @c %start of fragment | ||
| 28808 | |||
| 28809 | @deftp {Data Type} forgejo-configuration | ||
| 28810 | Available @code{forgejo-configuration} fields are: | ||
| 28811 | |||
| 28812 | @table @asis | ||
| 28813 | @item @code{forgejo} (default: @code{forgejo}) (type: file-like) | ||
| 28814 | The forgejo package. | ||
| 28815 | |||
| 28816 | @item @code{work-directory} (default: @code{"/var/lib/forgejo"}) (type: string) | ||
| 28817 | The directory where Forgejo keeps its state, including its database when | ||
| 28818 | using @code{"sqlite3"} as the @code{database-type}. | ||
| 28819 | |||
| 28820 | @item @code{shepherd-provision} (default: @code{(forgejo)}) (type: list-of-symbols) | ||
| 28821 | The name(s) of the service. | ||
| 28822 | |||
| 28823 | @item @code{configuration-wizard?} (default: @code{#f}) (type: boolean) | ||
| 28824 | Whether to use the initial configuration page (wizard) to setup Forgejo. | ||
| 28825 | Setting this to @code{#t} means that none of the declarative | ||
| 28826 | configuration values will be honored. The Forgejo-generated | ||
| 28827 | configuration file will be kept under @file{custom/conf/app.ini}, | ||
| 28828 | relative to the value of the @code{work-directory}. | ||
| 28829 | |||
| 28830 | @item @code{user} (default: @code{"forgejo"}) (type: string) | ||
| 28831 | The name of the user under which Forgejo will be executed. | ||
| 28832 | |||
| 28833 | @item @code{group} (default: @code{"forgejo"}) (type: string) | ||
| 28834 | The name of the group under which Forgejo will be executed. | ||
| 28835 | |||
| 28836 | @item @code{custom-configuration-file} (type: maybe-file-like) | ||
| 28837 | File-like object to provide a complete Forgejo configuration file as an | ||
| 28838 | escape hatch, overriding every other fields of this configuration. | ||
| 28839 | |||
| 28840 | @item @code{application-name} (default: @code{"Forgejo"}) (type: string) | ||
| 28841 | The application name that shows in every page title. | ||
| 28842 | |||
| 28843 | @item @code{application-slogan} (default: @code{""}) (type: string) | ||
| 28844 | Slogan to show near the application name in every page title. | ||
| 28845 | |||
| 28846 | @item @code{run-mode} (default: @code{"prod"}) (type: run-mode) | ||
| 28847 | The run mode to use; either @code{"dev"} or @code{"prod"}. | ||
| 28848 | |||
| 28849 | @item @code{domain} (default: @code{"localhost"}) (type: string) | ||
| 28850 | The domain name or host address of the server. | ||
| 28851 | |||
| 28852 | @item @code{offline-mode?} (default: @code{#f}) (type: boolean) | ||
| 28853 | Set to @code{#t} to run Forgejo in offline mode, meaning it won't reach | ||
| 28854 | out to any external services such as Gravatar, CDNs, etc. and serve | ||
| 28855 | everything locally instead. | ||
| 28856 | |||
| 28857 | @item @code{port} (default: @code{3000}) (type: unprivileged-port) | ||
| 28858 | The port Forgejo will listen on. The port should be an unprivileged | ||
| 28859 | port; to serve Forgejo on a privileged port like @code{80}, configure a | ||
| 28860 | reverse proxy. It is ignored when using a Unix-domain socket. | ||
| 28861 | |||
| 28862 | @item @code{protocol} (default: @code{"http"}) (type: protocol) | ||
| 28863 | Listen protocol. Either @code{http}, @code{https}, @code{fcgi}, | ||
| 28864 | @code{"http+unix"} or @code{"fcgi+unix"}. @samp{+unix} means @emph{via} | ||
| 28865 | a Unix-domain socket, in which case @code{http-address} must be the file | ||
| 28866 | name of the socket to use. | ||
| 28867 | |||
| 28868 | @item @code{root-url} (type: maybe-string) | ||
| 28869 | Overwrite the automatically generated public URL, which implicitly | ||
| 28870 | defaults to @samp{@var{protocol}://@var{domain}:@var{port}}, which is | ||
| 28871 | necessary using a reverse proxy. | ||
| 28872 | |||
| 28873 | @item @code{http-address} (default: @code{"0.0.0.0"}) (type: string) | ||
| 28874 | The address to listen to. It can be an absolute file name when using a | ||
| 28875 | Unix-domain socket, for example @file{/run/forgejo.sock}, or a file name | ||
| 28876 | relative to the @code{work-directory}, for example @file{forgejo.sock}. | ||
| 28877 | |||
| 28878 | @item @code{ssh-address} (default: @code{"0.0.0.0"}) (type: string) | ||
| 28879 | The IP address to listen on for the SSH server. | ||
| 28880 | |||
| 28881 | @item @code{lfs?} (default: @code{#t}) (type: boolean) | ||
| 28882 | Whether to enable Git LFS support. | ||
| 28883 | |||
| 28884 | @item @code{lfs-secret-file} (default: @code{"/etc/forgejo/lfs_jwt_secret"}) (type: string) | ||
| 28885 | The file name of the LFS JWT (JSON Web Token) secret, necessary for | ||
| 28886 | proper Git LFS operation, which can be generated with @samp{forgejo | ||
| 28887 | generate secret JWT_SECRET}. Automatically generated the first time | ||
| 28888 | Forgejo runs if it does not yet exist. | ||
| 28889 | |||
| 28890 | @item @code{mail-notification?} (default: @code{#f}) (type: boolean) | ||
| 28891 | Whether to enable email notifications. | ||
| 28892 | |||
| 28893 | @item @code{acme?} (default: @code{#f}) (type: boolean) | ||
| 28894 | Whether to enable @acronym{ACME,Automatic Certificate Management | ||
| 28895 | Environment}, to automatically provision TLS certificates, which can be | ||
| 28896 | useful if you use the @code{https} or @code{https+unix} protocols. | ||
| 28897 | |||
| 28898 | @item @code{tls-cert-file} (default: @code{"https/cert.pem"}) (type: string) | ||
| 28899 | File name of a TLS certificate file. Ignored if @code{acme?} is | ||
| 28900 | enabled. A relative file name is located under | ||
| 28901 | @file{@var{work-directory}/custom}. | ||
| 28902 | |||
| 28903 | @item @code{tls-key-file} (default: @code{"https/key.pem"}) (type: string) | ||
| 28904 | File name of a TLS key. Ignored if @code{acme?} is enabled. A relative | ||
| 28905 | file name is located under @file{@var{work-directory}/custom}. | ||
| 28906 | |||
| 28907 | @item @code{ssh-port} (default: @code{22}) (type: port-or-false) | ||
| 28908 | The SSH port Forgejo will use; if you already run an OpenSSH as the SSH | ||
| 28909 | server, specify the port used by the SSH daemon. Otherwise, you need to | ||
| 28910 | use an unprivileged port (greater or equal to 1024) which Forgejo will | ||
| 28911 | use with its built-in SSH server. Set to @code{#f} to disable SSH | ||
| 28912 | support. | ||
| 28913 | |||
| 28914 | @item @code{actions?} (default: @code{#t}) (type: boolean) | ||
| 28915 | Whether to enable actions capabilities. | ||
| 28916 | |||
| 28917 | @item @code{default-actions-url} (default: @code{"https://code.forgejo.org"}) (type: string) | ||
| 28918 | The default address to fetch action plugins from. | ||
| 28919 | |||
| 28920 | @item @code{internal-token-file} (default: @code{"/etc/forgejo/internal_token"}) (type: string) | ||
| 28921 | The file name of the internal token used to validate communication | ||
| 28922 | within Forgejo, which can be generated with @samp{forgejo generate | ||
| 28923 | secret INTERNAL_TOKEN} | ||
| 28924 | |||
| 28925 | @item @code{secret-key-file} (default: @code{"/etc/forgejo/secret_key"}) (type: string) | ||
| 28926 | The file name containing the global secret key used for encrypting data | ||
| 28927 | like 2FA secrets; it is thus very important to back it up somewhere safe | ||
| 28928 | to avoid losing access to encrypted data. | ||
| 28929 | |||
| 28930 | @item @code{oauth2-jwt-secret-file} (default: @code{"/etc/forgejo/oauth2_jwt_secret"}) (type: string) | ||
| 28931 | The file name of the OAuth2 JWT secret, which Forgejo expects to exist. | ||
| 28932 | |||
| 28933 | @item @code{mail-notification-on-new-user-signin?} (default: @code{#f}) (type: boolean) | ||
| 28934 | Whether to notify administrators by email when a new user signs in for | ||
| 28935 | the first time. | ||
| 28936 | |||
| 28937 | @item @code{mailer?} (default: @code{#f}) (type: boolean) | ||
| 28938 | Whether to enable the mail server integration, used for sending email | ||
| 28939 | notifications for example. | ||
| 28940 | |||
| 28941 | @item @code{mail-from} (default: @code{""}) (type: string) | ||
| 28942 | The FROM email address used for sent emails, per the RFC 5322 | ||
| 28943 | specification. This can be for example just an email address, or | ||
| 28944 | something like @samp{"Name" <email@@example.com>}. This field | ||
| 28945 | @emph{must} be specified if @code{mailer?} is set to @code{#t}. | ||
| 28946 | |||
| 28947 | @item @code{mail-subject-prefix} (default: @code{""}) (type: string) | ||
| 28948 | The prefix displayed before the subject in emails. | ||
| 28949 | |||
| 28950 | @item @code{mail-protocol} (default: @code{""}) (type: mail-protocol) | ||
| 28951 | The mail server protocol. One of @code{"smtp"}, @code{"smtps"}, | ||
| 28952 | @code{"smtp+starttls"}, @code{"smtp+unix"}, @code{"sendmail"}, | ||
| 28953 | @code{"dummy"} or @code{""}. The empty string defaults means the | ||
| 28954 | protocol is inferred from the value of the @code{smtp-port} value, | ||
| 28955 | meaning its effective implicit value is @code{"smtps"}. @code{"dummy"} | ||
| 28956 | causes emails to be sent to the log, useful for testing. When | ||
| 28957 | @code{"sendmail"} is used, it is expected to be fully and correctly | ||
| 28958 | externally configured, with the other @samp{smtp-} prefixed options of | ||
| 28959 | this configuration ignored. | ||
| 28960 | |||
| 28961 | @item @code{smtp-address} (default: @code{""}) (type: string) | ||
| 28962 | The mail server address, for example @code{"smtp.example.com"} or an | ||
| 28963 | absolute file name, if using @code{"smtp+unix"} for the | ||
| 28964 | @code{mail-protocol}. | ||
| 28965 | |||
| 28966 | @item @code{smtp-port} (default: @code{465}) (type: port) | ||
| 28967 | The mail server port. This field affects the implicit value of the | ||
| 28968 | @code{mail-protocol}. | ||
| 28969 | |||
| 28970 | @item @code{smtp-user} (default: @code{""}) (type: string) | ||
| 28971 | The SMTP server user name, if required | ||
| 28972 | |||
| 28973 | @item @code{smtp-password-file} (default: @code{""}) (type: string) | ||
| 28974 | An absolute file name containing the password of the SMTP server. | ||
| 28975 | |||
| 28976 | @item @code{mail-plain-text?} (default: @code{#f}) (type: boolean) | ||
| 28977 | Send emails only in plain text, without HTML alternative. | ||
| 28978 | |||
| 28979 | @item @code{sendmail-command} (default: @code{"sendmail"}) (type: string) | ||
| 28980 | The file name of the @command{sendmail} command to use, which can be | ||
| 28981 | either an absolute file name or a command name to be looked from | ||
| 28982 | @env{"PATH"}. | ||
| 28983 | |||
| 28984 | @item @code{sendmail-options} (default: @code{()}) (type: list-of-strings) | ||
| 28985 | Optional options to pass to the @command{sendmail} command. If your | ||
| 28986 | @code{sendmail} program, like that of Postfix, interprets options, you | ||
| 28987 | should provide @code{"--"} as the first option. | ||
| 28988 | |||
| 28989 | @item @code{sendmail-timeout} (default: @code{"5m"}) (type: string) | ||
| 28990 | The timeout for Sendmail, provided as a | ||
| 28991 | @uref{https://pkg.go.dev/time#ParseDuration,Go @code{time.Duration} | ||
| 28992 | string}, for example @code{"300ms"}, @code{"1.5h"} or @code{"2h45m"}. | ||
| 28993 | |||
| 28994 | @item @code{sendmail-convert-crlf?} (default: @code{#t}) (type: boolean) | ||
| 28995 | Whether to convert @samp{\r\n} to @samp{\n} for Sendmail. | ||
| 28996 | |||
| 28997 | @item @code{log-level} (default: @code{"info"}) (type: log-level) | ||
| 28998 | The log level to use. Either @code{"trace"}, @code{"debug"}, | ||
| 28999 | @code{"info"}, @code{"warn"}, @code{"error"} or @code{"none"}. | ||
| 29000 | |||
| 29001 | @item @code{openid-signin?} (default: @code{#t}) (type: boolean) | ||
| 29002 | Whether to allow signing in using OpenID. | ||
| 29003 | |||
| 29004 | @item @code{disable-registration?} (default: @code{#f}) (type: boolean) | ||
| 29005 | Disallow registration, only allowing administrators to create accounts. | ||
| 29006 | |||
| 29007 | @item @code{confirm-mail-on-registration?} (default: @code{#f}) (type: boolean) | ||
| 29008 | Whether to require email confirmation when new users register. | ||
| 29009 | |||
| 29010 | @item @code{require-signin-to-view?} (default: @code{#f}) (type: boolean) | ||
| 29011 | Whether users must sign in before they can view the explore pages. | ||
| 29012 | |||
| 29013 | @item @code{default-keep-email-private?} (default: @code{#f}) (type: boolean) | ||
| 29014 | Whether by default a user email is displayed on their profile. | ||
| 29015 | |||
| 29016 | @item @code{user-push-to-create?} (default: @code{#f}) (type: boolean) | ||
| 29017 | Allow users to push local repositories to Forgejo and have them | ||
| 29018 | automatically created for a user. | ||
| 29019 | |||
| 29020 | @item @code{organization-push-to-create?} (default: @code{#f}) (type: boolean) | ||
| 29021 | Allow users to push local repositories to Forgejo and have them | ||
| 29022 | automatically created for an organization. | ||
| 29023 | |||
| 29024 | @item @code{default-push-to-create-private?} (default: @code{#t}) (type: boolean) | ||
| 29025 | Whether to make newly created repositories private by default when they | ||
| 29026 | were created via push. | ||
| 29027 | |||
| 29028 | @item @code{default-merge-style} (default: @code{"merge"}) (type: merge-style) | ||
| 29029 | The default merge style to use. Either @code{"merge"}, @code{"rebase"}, | ||
| 29030 | @code{"rebase-merge"}, @code{"squash"} or @code{"fast-forward-only"}. | ||
| 29031 | |||
| 29032 | @item @code{default-trust-model} (default: @code{"committer"}) (type: trust-model) | ||
| 29033 | The default trust model for repositories. Either @code{"collaborator"}, | ||
| 29034 | @code{"committer"} or @code{"collaboratorcommitter"} | ||
| 29035 | |||
| 29036 | @item @code{metrics?} (default: @code{#f}) (type: boolean) | ||
| 29037 | Whether to enable the metrics endpoint. | ||
| 29038 | |||
| 29039 | @item @code{metrics-token} (default: @code{""}) (type: string) | ||
| 29040 | A secret to use, if authorization to the metrics endpoint is desired. | ||
| 29041 | |||
| 29042 | @item @code{database-type} (default: @code{"sqlite3"}) (type: database-type) | ||
| 29043 | The database type to use. Either @code{"sqlite3"}, @code{"mysql"} or | ||
| 29044 | @code{"postgres"}. The sqlite3 type is the simplest to use, but a | ||
| 29045 | full-fledged database like PostgreSQL may scale better for multiple | ||
| 29046 | users. If you change this, make sure to adjust the other | ||
| 29047 | @samp{database-*} values accordingly. Also note that currently, the | ||
| 29048 | PostgreSQL and MySQL databases must be manually created: refer to the | ||
| 29049 | official Forgejo documentation for | ||
| 29050 | @uref{https://forgejo.org/docs/latest/admin/installation/database-preparation,database | ||
| 29051 | preparation}. | ||
| 29052 | |||
| 29053 | @item @code{database-host} (default: @code{"/var/run/postgresql"}) (type: string) | ||
| 29054 | This is the @samp{@var{host}:@var{port}} tuple for remote database | ||
| 29055 | MySQL/PostgreSQL hosts, or a local Unix-domain socket file. If using | ||
| 29056 | MySQL, this should be adjusted to @file{/run/mysqld/mysqld.sock} | ||
| 29057 | |||
| 29058 | @item @code{database-name} (default: @code{"forgejo"}) (type: string) | ||
| 29059 | The MySQL/PostgreSQL database name to use. | ||
| 29060 | |||
| 29061 | @item @code{database-user} (default: @code{"forgejo"}) (type: string) | ||
| 29062 | The MySQL/PostgreSQL database user to use. | ||
| 29063 | |||
| 29064 | @item @code{database-password-file} (type: maybe-string) | ||
| 29065 | A file name containing the password to access the MySQL/PostgreSQL | ||
| 29066 | database, for example @file{"/etc/forgejo/db_passwd"}. | ||
| 29067 | |||
| 29068 | @item @code{database-tls?} (default: @code{#f}) (type: ssl-mode) | ||
| 29069 | Whether the connection to a MySQL/PostgreSQL database should use TLS. | ||
| 29070 | Set to @code{#t} to enable TLS with full verification or to | ||
| 29071 | @code{'skip-verify} to enable TLS without verification. | ||
| 29072 | |||
| 29073 | @end table | ||
| 29074 | |||
| 29075 | @end deftp | ||
| 29076 | |||
| 29077 | |||
| 29078 | @c %end of fragment | ||
| 29079 | |||
| 29080 | 28761 | ||
| 29081 | @node Database Services | 28762 | @node Database Services |
| 29082 | @subsection Database Services | 28763 | @subsection Database Services |
