# SPDX-FileCopyrightText: 2026-present Robert Kormann <rokor@kormann.info>
#
# SPDX-License-Identifier: Unlicense
#
# FlashBoard configuration file (.env)
#
# This file was copied from the bundled defaults (src/flshbd/core/.env) on
# first start, and can then be edited per environment. Its location is the
# data directory of the environment:
#   development/testing: <cwd>/flshbd-data/.env
#   production:          ~/.config/flshbd/.env
# An existing file is never overwritten by FlashBoard.
#
# Loading this file requires the optional dependency python-dotenv:
#   pip install flshbd[dotenv]
#
# Precedence (highest first):
#   1. variable exported in the process environment
#   2. variable set in this file
#   3. built-in default in flshbd/core/config.py
#
# The values are read once at process start (the file is loaded before
# flshbd.core.config is imported), so changes require a restart of the
# server process.

# Stable key for signing the session cookie, so that sessions survive server
# restarts. Generate a value with: fld dash generate-secret-key
# Default: empty -- an ephemeral key is generated at each server start,
# which invalidates all existing sessions on restart.
# FLSHBD_SECRET_KEY=

# Domain of the session cookie, e.g. ".example.com", so the cookie is also
# sent to subdomains (needed for Nginx auth_request on subdomains, see
# docs/nginx_auth.md).
# Default: empty -- the cookie stays host-only.
# FLSHBD_COOKIE_DOMAIN=

# Session inactivity timeout in seconds (sliding timeout, e.g. "3600").
# Unset, non-integer, or non-positive values fall back to the default.
# Default: 1800 (30 minutes).
# FLSHBD_SESSION_LIFETIME=1800

# Use PAM (system) authentication instead of DB-stored passwords.
# Requires the optional dependency: pip install flshbd[pam]
# See docs/pamconfig.md.
# Default: false
# FLSHBD_PAM_ENABLED=false
# PAM service name.
# Default: login
# FLSHBD_PAM_SERVICE=login

# Custom folders for the Jinja2 templates resp. the static files, used as-is
# and never copied into. Without them, <DATA_DIR>/templates resp.
# <DATA_DIR>/static are used (auto-populated with the bundled copies on first
# start), falling back to the folders bundled with the package.
# Default: empty
# FLSHBD_TEMPLATE_FOLDER=
# FLSHBD_STATIC_FOLDER=
