diff --git a/webapp.nix b/webapp.nix index 177ec21..41ee2e6 100644 --- a/webapp.nix +++ b/webapp.nix @@ -15,9 +15,28 @@ let cfg = config.services.webapp; + # Synthesize a brand kit from `appName` when no explicit brandDir is + # provided: take the flake's default logo and overlay a brand.json + # carrying the host's app name. This lets existing hosts keep + # `services.webapp.appName = "Bouge"` and get "Bouge" in the manifest + # WITHOUT needing to author a full brand kit per host. Hosts that DO + # author a brand kit (logo, theme colors) supply `brandDir` directly + # and `appName` becomes informational. + synthesizedBrand = pkgs.runCommand "aio-webapp-brand-${cfg.appName}" {} '' + mkdir -p $out + cp ${cfg.flake}/branding/default/logo.png $out/logo.png + cat > $out/brand.json <