{ config, ... }: let name = "panel"; in { imports = [ (import ../../../panel { }).module ]; security.acme = { acceptTerms = true; defaults.email = "beheer@procolix.com"; }; services.${name} = { enable = true; production = true; domain = "demo.fediversity.eu"; # FIXME: make it work without this duplication settings = let cfg = config.services.${name}; in { STATIC_ROOT = "/var/lib/${name}/static"; DEBUG = false; ALLOWED_HOSTS = [ cfg.domain cfg.host "localhost" "[::1]" ]; CSRF_TRUSTED_ORIGINS = [ "https://${cfg.domain}" ]; COMPRESS_OFFLINE = true; LIBSASS_OUTPUT_STYLE = "compressed"; }; secrets = { SECRET_KEY = config.age.secrets.panel-secret-key.path; }; port = 8000; }; }