From 5fc5c123ff2b1e75367a284bba8acba13148615b Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Tue, 19 Aug 2025 10:23:17 +0200 Subject: [PATCH] update module --- flake.nix | 9 +++------ gulpfile.js | 9 ++++++++- module.nix | 4 ++-- templates/base.html | 3 ++- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 8cdf623..61861b3 100644 --- a/flake.nix +++ b/flake.nix @@ -23,12 +23,7 @@ src = self; - dependencies = with python3Packages; [ - python - falcon - requests - jinja2 - ]; + dependencies = with python3Packages; [ falcon requests jinja2 ]; installPhase = '' install -Dm755 ${./fragify.py} $out/bin/fragify @@ -42,6 +37,8 @@ fi ''; + passthru.pythonPath = python3Packages.makePythonPath dependencies; + meta.mainProgram = "fragify"; }; }; diff --git a/gulpfile.js b/gulpfile.js index e6113ba..3628105 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -31,6 +31,13 @@ gulp.task('copy-select2-theme', function () { .pipe(gulp.dest('./assets/css')); }); -gulp.task('copy-assets', gulp.series('copy-bulk', 'copy-jquery', 'copy-select2-theme')); +// Copy favicon(s) +gulp.task('copy-favicon', function () { + return gulp + .src(['./favicon.svg'], { allowEmpty: true }) + .pipe(gulp.dest('./assets')); +}); + +gulp.task('copy-assets', gulp.series('copy-bulk', 'copy-jquery', 'copy-select2-theme', 'copy-favicon')); gulp.task('default', gulp.series('copy-assets')); \ No newline at end of file diff --git a/module.nix b/module.nix index c8d60ed..7e8f965 100644 --- a/module.nix +++ b/module.nix @@ -44,11 +44,11 @@ in "no-orphans" = true; # Pass environment to the app env = { + PYTHONPATH = "${pkgs.fragify.pythonPath}"; FRAGIFY_TEMPLATES_DIR = "${pkgs.fragify}/share/fragify/templates"; FRAGIFY_STATIC_DIR = "${pkgs.fragify}/share/fragify/assets"; }; - # Python deps for the embedded interpreter - pythonPackages = p: with p; [ falcon requests jinja2 ]; + # Python deps for the embedded interpreter moved to PYTHONPATH in env # Extra raw uWSGI settings not covered by module options settings = { "static-map" = "/static=${pkgs.fragify}/share/fragify/assets"; diff --git a/templates/base.html b/templates/base.html index 9121a9a..5c96c5b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -25,7 +25,8 @@ {% if noindex %}{% endif %} - + + {% block meta_extra %}{% endblock %}