attic icon indicating copy to clipboard operation
attic copied to clipboard

nixos: Allow settings to be omitted with null

Open zhaofengli opened this issue 1 year ago • 0 comments

The ATTIC_SERVER_DATABASE_URL, PGUSERNAME and PGPASSWORD environment variables already work, but there are paper cuts when using them with the NixOS module:

  • The module sets database.url by default, which cannot easily suppressed if you intend to set ATTIC_SERVER_DATABASE_URL
  • The server doesn't support the [database] section being omitted entirely

Alternative: Instead of allowing settings to be null in the module, we can add an useSqlite/addSqliteDefaults option that defaults to true.

In the future, we need to rethink about the precedence of configuration sources. It makes sense for the environment variables to take precedence over configuration files.

Ref: #152.

zhaofengli avatar Nov 21 '24 20:11 zhaofengli