Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos: Allow settings to be omitted with null #207

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zhaofengli
Copy link
Owner

@zhaofengli zhaofengli commented Nov 21, 2024

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.

This allows for suppressing the default database.url setting
in the NixOS module.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant