Skip to content

Hedgedoc

services.hedgedoc.enable

Whether to enable the HedgeDoc Markdown Editor. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.environmentFile

Environment file as defined in {manpage}systemd.exec(5).

Secrets may be passed to the service without adding them to the world-readable Nix store, by specifying placeholder variables as the option value in Nix and setting these variables accordingly in the environment file.

  # snippet of HedgeDoc-related config
  services.hedgedoc.settings.dbURL = "postgres://hedgedoc:\${DB_PASSWORD}@db-host:5432/hedgedocdb";
  services.hedgedoc.settings.minio.secretKey = "$MINIO_SECRET_KEY";
  # content of the environment file
  DB_PASSWORD=verysecretdbpassword
  MINIO_SECRET_KEY=verysecretminiokey

Note that this file needs to be available on the host on which HedgeDoc is running.

Type: null or path

Default

null

Example

"/var/lib/hedgedoc/hedgedoc.env"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.package

The hedgedoc package to use. Type: package

Default

pkgs.hedgedoc

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.settings

HedgeDoc configuration, see https://docs.hedgedoc.org/configuration/ for documentation.

Type: JSON value

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.settings.allowGravatar

Whether to enable Libravatar as profile picture source on your instance.

Despite the naming of the setting, Hedgedoc replaced Gravatar with Libravatar in CodiMD 1.4.0

Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.settings.allowOrigin

List of domains to whitelist.

Type: list of string

Default

with config.services.hedgedoc.settings; [ host ] ++ lib.optionals (domain != null) [ domain ]

Example

["localhost""hedgedoc.org"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.settings.db

Specify the configuration for sequelize. HedgeDoc supports mysql, postgres, sqlite and mssql. See https://sequelize.readthedocs.io/en/v3/ for more information.

::: {.note} The relevant parts will be overriden if you set {option}dbURL. :::

Type: attribute set

Default

{dialect = "sqlite";storage = "/var/lib/hedgedoc/db.sqlite";}

Example

db = {username = "hedgedoc";database = "hedgedoc";host = "localhost:5432";# or via socket# host = "/run/postgresql";dialect = "postgresql";};

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.settings.domain

Domain to use for website.

This is useful if you are trying to run hedgedoc behind a reverse proxy.

Type: null or string

Default

null

Example

"hedgedoc.org"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.settings.host

Address to listen on.

Type: null or string

Default

"localhost"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.settings.path

Path to UNIX domain socket to listen on

::: {.note} If specified, {option}host and {option}port will be ignored. :::

Type: null or path

Default

null

Example

"/run/hedgedoc/hedgedoc.sock"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.settings.port

Port to listen on.

Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default

3000

Example

80

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.settings.protocolUseSSL

Use https:// for all links.

This is useful if you are trying to run hedgedoc behind a reverse proxy.

::: {.note} Only applied if {option}domain is set. :::

Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.settings.uploadsPath

Directory for storing uploaded images.

Type: path

Default

"/var/lib/hedgedoc/uploads"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.settings.urlPath

URL path for the website.

This is useful if you are hosting hedgedoc on a path like www.example.com/hedgedoc

Type: null or string

Default

null

Example

"hedgedoc"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix

services.hedgedoc.settings.useSSL

Enable to use SSL server.

::: {.note} This will also enable {option}protocolUseSSL.

It will also require you to set the following:

  • {option}sslKeyPath
  • {option}sslCertPath
  • {option}sslCAPath
  • {option}dhParamPath :::

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/web-apps/hedgedoc.nix