Forgejo
Open source software forge with a focus on federation
Declared in: projects/Forgejo/default.nix
Demo
Implement missing demoOptions
programs.forgejo
- 
  
  
Whether to enable forgejo.
- Type:
 boolean- Default:
 false- Declared in:
 - projects/Forgejo/program/module.nix
 
 
programs.forgejo.enable
services.forgejo
- 
  
  
Base directory for custom templates and other options.
If {option}
services.forgejo.useWizardis disabled (default), this directory will also hold secrets and the resulting {file}app.iniconfig at runtime.- Type:
 string- Default:
 "${config.services.forgejo.stateDir}/custom"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Whether to create a local database automatically.
- Type:
 boolean- Default:
 true- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Database host address.
- Type:
 string- Default:
 "127.0.0.1"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Database name.
- Type:
 string- Default:
 "forgejo"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
A file containing the password corresponding to {option}
services.forgejo.database.user.- Type:
 null or absolute path- Default:
 null- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Path to the sqlite3 database file.
- Type:
 string- Default:
 "${config.services.forgejo.stateDir}/data/forgejo.db"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Database host port.
- Type:
 16 bit unsigned integer; between 0 and 65535 (both inclusive)- Default:
 if config.services.forgejo.database.type != "postgresql" then 3306 else 5432- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Path to the unix socket file to use for authentication.
- Type:
 null or absolute path- Default:
 null- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Database engine to use.
- Type:
 one of "sqlite3", "mysql", "postgres"- Default:
 "sqlite3"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Database user.
- Type:
 string- Default:
 "forgejo"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Age of backup used to decide what files to delete when cleaning. If a file or directory is older than the current time minus the age field, it is deleted.
The format is described in {manpage}
tmpfiles.d(5).- Type:
 string- Default:
 "4w"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Path to the directory where the dump archives will be stored.
- Type:
 string- Default:
 "${config.services.forgejo.stateDir}/dump"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Whether to enable periodic dumps via the built-in {command}
dumpcommand.- Type:
 boolean- Default:
 false- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Filename to be used for the dump. If
nulla default name is chosen by forgejo.- Type:
 null or string- Default:
 null- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Run a Forgejo dump at this interval. Runs by default at 04:31 every day.
The format is described in {manpage}
systemd.time(7).- Type:
 string- Default:
 "04:31"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Archive format used to store the dump file.
- Type:
 one of "zip", "tar", "tar.sz", "tar.gz", "tar.xz", "tar.bz2", "tar.br", "tar.lz4", "tar.zst"- Default:
 "zip"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Whether to enable Forgejo, a software forge.
- Type:
 boolean- Default:
 false- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Group under which Forgejo runs.
- Type:
 string- Default:
 "forgejo"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Where to store LFS files.
- Type:
 string- Default:
 "${config.services.forgejo.stateDir}/data/lfs"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Enables git-lfs support.
- Type:
 boolean- Default:
 false- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
The forgejo-lts package to use.
- Type:
 package- Default:
 pkgs.forgejo-lts- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Path to the git repositories.
- Type:
 string- Default:
 "${config.services.forgejo.stateDir}/repositories"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
This is a small wrapper over systemd's
LoadCredential.It takes the same sections and keys as {option}
services.forgejo.settings, but the value of each key is a path instead of a string or bool.The path is then loaded as credential, exported as environment variable and then feed through https://codeberg.org/forgejo/forgejo/src/branch/forgejo/contrib/environment-to-ini/environment-to-ini.go.
It does the required environment variable escaping for you.
::: {.note} Keys specified here take priority over the ones in {option}
services.forgejo.settings! :::- Type:
 open submodule of attribute set of attribute set of absolute path- Default:
 { }- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Free-form settings written directly to the
app.iniconfigfile file. Refer to https://forgejo.org/docs/latest/admin/config-cheat-sheet/ for supported values.- Type:
 open submodule of attribute set of section of an INI file (attrs of INI atom (null, bool, int, float or string))- Default:
 { }- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
General log level.
- Type:
 one of "Trace", "Debug", "Info", "Warn", "Error", "Critical"- Default:
 "Info"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Root path for log files.
- Type:
 string- Default:
 "${config.services.forgejo.stateDir}/log"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Disable external SSH feature.
- Type:
 boolean- Default:
 false- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Domain name of your server.
- Type:
 string- Default:
 "localhost"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Listen address. Must be a path when using a unix socket.
- Type:
 string or absolute path- Default:
 if lib.hasSuffix "+unix" cfg.settings.server.PROTOCOL then "/run/forgejo/forgejo.sock" else "0.0.0.0"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Listen port. Ignored when using a unix socket.
- Type:
 16 bit unsigned integer; between 0 and 65535 (both inclusive)- Default:
 3000- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Listen protocol.
+unixmeans "over unix", not "in addition to."- Type:
 one of "http", "https", "fcgi", "http+unix", "fcgi+unix"- Default:
 "http"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Full public URL of Forgejo server.
- Type:
 string- Default:
 "http://${config.services.forgejo.settings.server.DOMAIN}:${toString config.services.forgejo.settings.server.HTTP_PORT}/"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
SSH port displayed in clone URL. The option is required to configure a service when the external visible port differs from the local listening port i.e. if port forwarding is used.
- Type:
 16 bit unsigned integer; between 0 and 65535 (both inclusive)- Default:
 22- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Upper level of template and static files path.
- Type:
 string or absolute path- Default:
 config.services.forgejo.package.data- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Marks session cookies as "secure" as a hint for browsers to only send them via HTTPS. This option is recommend, if Forgejo is being served over HTTPS.
- Type:
 boolean- Default:
 false- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Forgejo data directory.
- Type:
 string- Default:
 "/var/lib/forgejo"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
Whether to use the built-in installation wizard instead of declaratively managing the {file}
app.iniconfig file in nix.- Type:
 boolean- Default:
 false- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 - 
  
  
User account under which Forgejo runs.
- Type:
 string- Default:
 "forgejo"- Declared in:
 - nixos/modules/services/misc/forgejo.nix
 
 
services.forgejo.customDir
services.forgejo.database.createDatabase
services.forgejo.database.host
services.forgejo.database.name
services.forgejo.database.passwordFile
services.forgejo.database.path
services.forgejo.database.port
services.forgejo.database.socket
services.forgejo.database.type
services.forgejo.database.user
services.forgejo.dump.age
services.forgejo.dump.backupDir
services.forgejo.dump.enable
services.forgejo.dump.file
services.forgejo.dump.interval
services.forgejo.dump.type
services.forgejo.enable
services.forgejo.group
services.forgejo.lfs.contentDir
services.forgejo.lfs.enable
services.forgejo.package
services.forgejo.repositoryRoot
services.forgejo.secrets
services.forgejo.settings
services.forgejo.settings.log.LEVEL
services.forgejo.settings.log.ROOT_PATH
services.forgejo.settings.server.DISABLE_SSH
services.forgejo.settings.server.DOMAIN
services.forgejo.settings.server.HTTP_ADDR
services.forgejo.settings.server.HTTP_PORT
services.forgejo.settings.server.PROTOCOL
services.forgejo.settings.server.ROOT_URL
services.forgejo.settings.server.SSH_PORT
services.forgejo.settings.server.STATIC_ROOT_PATH
services.forgejo.settings.session.COOKIE_SECURE
services.forgejo.stateDir
services.forgejo.useWizard
services.forgejo.user
Examples
This project is funded by NLnet through these subgrants:
- Entrust
 - Federated-Forgejo
 - Forgejo
 
Related links: