diff --git a/machines/gerd.nix b/machines/gerd.nix index f2ea44e..76dbd7c 100644 --- a/machines/gerd.nix +++ b/machines/gerd.nix @@ -19,19 +19,11 @@ ./gerd/services/cyberchef.nix ./gerd/services/nextcloud.nix ./gerd/services/stalwart - ./gerd/services/wger ./gerd/services/element.nix ./gerd/services/matrix-synapse.nix ]; - # TODO: place this a better place - zramSwap = { - enable = true; - memoryPercent = 75; - algorithm = "lz4"; - }; - networking.hostName = "gerd"; networking.hostId = "e1166ac9"; @@ -45,7 +37,6 @@ "safe/svcs/nextcloud" = { mountpoint = "/srv/nextcloud"; extra.options.quota = "5G"; }; "safe/svcs/stalwart" = { mountpoint = "/srv/stalwart"; extra.options.quota = "5G"; }; "safe/svcs/synapse" = { mountpoint = "/srv/synapse"; extra.options.quota = "5G"; }; - "safe/svcs/wger" = { mountpoint = "/srv/wger"; extra.options.quota = "5G"; }; "safe/svcs/postgresql" = { mountpoint = "/srv/postgresql"; extra.options.quota = "5G"; }; "backup/postgresql" = { mountpoint = "/media/backup/postgresqlbackup"; extra.options.quota = "5G"; }; }; diff --git a/machines/gerd/services/authelia/authelia-nginx.nix b/machines/gerd/services/authelia/authelia-nginx.nix index 96d08f2..35346fc 100644 --- a/machines/gerd/services/authelia/authelia-nginx.nix +++ b/machines/gerd/services/authelia/authelia-nginx.nix @@ -76,9 +76,6 @@ let error_page 401 =302 https://${config.mine.shared.settings.authelia.domain}/?rd=$target_url; ''; in { - # TODO: fix this - mine.shared.lib.authelia.autheliaLocation = autheliaLocation; - mine.shared.lib.authelia.mkProtectedWebsite = { vhostConfig, endpoint ? "/" }: lib.recursiveUpdate vhostConfig { extraConfig = (lib.attrByPath [ "extraConfig" ] "" vhostConfig) + "\n" + "include ${autheliaLocation};"; locations."${endpoint}" = config.mine.shared.lib.authelia.mkProtectedLocation (lib.attrByPath [ "locations" endpoint ] {} vhostConfig); diff --git a/machines/gerd/services/wger/default.nix b/machines/gerd/services/wger/default.nix deleted file mode 100644 index 535cd9e..0000000 --- a/machines/gerd/services/wger/default.nix +++ /dev/null @@ -1,149 +0,0 @@ -{ config, pkgs, ... }: - -let - svc_domain = "wger.${config.mine.shared.settings.domain}"; - port = 8000; - wger_user = "wger"; - statedir = config.mine.zfsMounts."rpool/safe/svcs/wger"; - - wgerpkgs = pkgs.callPackage ./wgerpkg/default.nix {}; - -# # Application settings -# WGER_SETTINGS['EMAIL_FROM'] = 'wger Workout Manager ' -# WGER_SETTINGS["ALLOW_REGISTRATION"] = True -# WGER_SETTINGS["ALLOW_GUEST_USERS"] = True -# WGER_SETTINGS["ALLOW_UPLOAD_VIDEOS"] = False -# WGER_SETTINGS["MIN_ACCOUNT_AGE_TO_TRUST"] = 21 # in days -# WGER_SETTINGS["EXERCISE_CACHE_TTL"] = 3600 # in seconds - wger_settings = { - EMAIL_FROM = "wger Workout Manager "; - ALLOW_REGISTRATION = true; - ALLOW_GUEST_USERS = true; - ALLOW_UPLOAD_VIDEOS = false; - MIN_ACCOUNT_AGE_TO_TRUST = 21; - EXERCISE_CACHE_TTL = 3600; - }; - - django_settings = rec { - DEBUG = true; - DATABASES.default = { - # ENGINE = "django.db.backends.sqlite3"; - # NAME = "${statedir}/database.sqlite"; - # USER = ""; - # PASSWORD = ""; - # HOST = ""; - # PORT = ""; - ENGINE = "django.db.backends.postgresql"; - NAME = "wger"; - USER = "wger"; - PASSWORD = ""; - HOST = "/run/postgresql"; - PORT = ""; - }; - - ADMINS = [["Your Name" "test@test.dk"]]; - MANAGERS = ADMINS; - - TIME_ZONE = "Europe/Berlin"; - - SECRET_KEY = "2w!yl6ausb-$05#mjnec)g_h#nc9pzzw0c(kvaskocvyyg1oqc"; - - SITE_URL = "http://localhost:8100"; - - MEDIA_ROOT = "${statedir}/media"; - MEDIA_URL = "/media/"; - - EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"; - -# DEFAULT_FROM_EMAIL = WGER_SETTINGS['EMAIL_FROM'] - - EMAIL_PAGE_DOMAIN = SITE_URL; - - CSRF_TRUSTED_ORIGINS = [ "https://${svc_domain}" ]; - ALLOWED_HOSTS = [ svc_domain ]; - - RECAPTCHA_PUBLIC_KEY = ""; - RECAPTCHA_PRIVATE_KEY = ""; - USE_RECAPTCHA = false; - - }; - - wger_settings_file = pkgs.writeText "settings.json" (builtins.toJSON wger_settings); - django_settings_file = pkgs.writeText "settings.json" (builtins.toJSON django_settings); - settingsFile = pkgs.writeText "settings.py" '' - from wger.settings_global import * - import json - - with open("${django_settings_file}") as f: - globals().update(json.load(f)) - - with open("${wger_settings_file}") as f: - WGER_SETTINGS.update(json.load(f)) - ''; -in { - - systemd.services.wger = { - description = "wger fitness"; - wantedBy = [ "multi-user.target" ]; - after = [ "networking.target" ]; - script = '' - # general wger things - ${wgerpkgs}/bin/wger migrate-db -s ${settingsFile} || true - # ${wgerpkgs}/bin/wger load-fixtures -s ${settingsFile} || true - # ${wgerpkgs}/bin/wger load-online-fixtures -s ${settingsFile} || true - - # manage things - # WGER_SETTINGS=${settingsFile} ${wgerpkgs}/bin/manage download-exercise-images || true - # WGER_SETTINGS=${settingsFile} ${wgerpkgs}/bin/manage download-exercise-videos || true - # WGER_SETTINGS=${settingsFile} ${wgerpkgs}/bin/manage download-ingredient-images || true - WGER_SETTINGS=${settingsFile} ${wgerpkgs}/bin/manage sync-exercises || true - # WGER_SETTINGS=${settingsFile} ${wgerpkgs}/bin/manage sync-ingredients || true - WGER_SETTINGS=${settingsFile} ${wgerpkgs}/bin/manage exercises-health-check || true - - # run server - ${wgerpkgs}/bin/wger start -s ${settingsFile} - ''; - - serviceConfig = { - User = "wger"; - Group = "wger"; - - }; - }; - users.users."${wger_user}"= { - uid = 738; - isSystemUser = true; - group = wger_user; - - }; - users.groups."${wger_user}".gid = 738; - - services.postgresql = { - ensureDatabases = [ wger_user ]; - ensureUsers = [{ - name = wger_user; - ensureDBOwnership = true; - }]; - }; - - - services.nginx.virtualHosts."${svc_domain}" = { - forceSSL = true; - enableACME = true; - - extraConfig = '' - include ${config.mine.shared.lib.authelia.autheliaLocation}; - ''; - - locations."/" = config.mine.shared.lib.authelia.mkProtectedLocation { - proxyPass = "http://localhost:${builtins.toString port}"; - }; - locations."/api/v2/register" = config.mine.shared.lib.authelia.mkProtectedLocation { - proxyPass = "http://localhost:${builtins.toString port}"; - }; - - locations."/static".proxyPass = "http://localhost:${builtins.toString port}"; - locations."/media".proxyPass = "http://localhost:${builtins.toString port}"; - locations."/api".proxyPass = "http://localhost:${builtins.toString port}"; - }; -} diff --git a/machines/gerd/services/wger/wgerpkg/.#settings.nix b/machines/gerd/services/wger/wgerpkg/.#settings.nix deleted file mode 120000 index 074416b..0000000 --- a/machines/gerd/services/wger/wgerpkg/.#settings.nix +++ /dev/null @@ -1 +0,0 @@ -eyjhb@chronos.625709:1733150131 \ No newline at end of file diff --git a/machines/gerd/services/wger/wgerpkg/.#settings.py b/machines/gerd/services/wger/wgerpkg/.#settings.py deleted file mode 120000 index 074416b..0000000 --- a/machines/gerd/services/wger/wgerpkg/.#settings.py +++ /dev/null @@ -1 +0,0 @@ -eyjhb@chronos.625709:1733150131 \ No newline at end of file diff --git a/machines/gerd/services/wger/wgerpkg/default.nix b/machines/gerd/services/wger/wgerpkg/default.nix deleted file mode 100644 index 8a9b38b..0000000 --- a/machines/gerd/services/wger/wgerpkg/default.nix +++ /dev/null @@ -1,97 +0,0 @@ -{ - lib, - python3, - fetchFromGitHub, - callPackage, -}: - -let - frontend = callPackage ./frontend.nix {}; -in python3.pkgs.buildPythonApplication rec { - pname = "wger"; - version = "unstable"; - pyproject = true; - - src = fetchFromGitHub { - owner = "wger-project"; - repo = "wger"; - rev = "bfca74e88f6c9ff6e917e0ba0e8e9c782ae0047b"; - hash = "sha256-VuVKgkNp6Omiag72lOn6p51kC/jvApX/kRAPpK95U7w="; - }; - - build-system = [ - python3.pkgs.hatchling - ]; - - patches = [ - ./patches/pyproject.patch - ./patches/tasks.patch - ./patches/manage.patch - ]; - - # dependencies = with python3.pkgs; [ - propagatedBuildInputs = with python3.pkgs; [ - bleach - celery - django-crispy-bootstrap5 - django - # django-activity-stream - (python3.pkgs.callPackage ./django-activity-stream.nix {}) - django-axes - django-compressor - django-cors-headers - django-crispy-forms - # django-email-verification - (python3.pkgs.callPackage ./django-email-verification.nix {}) - django-environ - django-filter - django-formtools - django-prometheus - # django-recaptcha - (python3.pkgs.callPackage ./django-recaptcha.nix {}) - django-simple-history - # django-sortedm2m - (python3.pkgs.callPackage ./django-sortedm2m.nix {}) - django-storages - djangorestframework - djangorestframework-simplejwt - drf-spectacular - easy-thumbnails - flower - fontawesomefree - icalendar - invoke - # openfoodfacts - (python3.pkgs.callPackage ./openfoodfacts.nix {}) - pillow - reportlab - requests - tqdm - tzdata - - # extra?? - drf-spectacular-sidecar - (python3.pkgs.callPackage ./django-bootstrap-breadcrumbs.nix {}) - psycopg2 - ]; - - postPatch = '' - cp manage.py wger/manage.py - ''; - - postInstall = '' - cp -a ${frontend}/static/yarn $out/${python3.sitePackages}/wger/core/static - ''; - - pythonImportsCheck = [ - "wger" - ]; - - meta = { - description = ""; - homepage = "https://github.com/wger-project/wger"; - license = lib.licenses.agpl3Only; - maintainers = with lib.maintainers; [ eyjhb ]; - mainProgram = "wger"; - }; -} diff --git a/machines/gerd/services/wger/wgerpkg/django-activity-stream.nix b/machines/gerd/services/wger/wgerpkg/django-activity-stream.nix deleted file mode 100644 index 020a402..0000000 --- a/machines/gerd/services/wger/wgerpkg/django-activity-stream.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - setuptools, - wheel, - django, -}: - -buildPythonPackage rec { - pname = "django-activity-stream"; - version = "2.0.0"; - pyproject = true; - - src = fetchFromGitHub { - owner = "justquick"; - repo = "django-activity-stream"; - rev = version; - hash = "sha256-fZrZDCWBFx1R9GGcTkjos7blSBNx1JTdTIVLKz+E2+c="; - }; - - build-system = [ - setuptools - wheel - ]; - - dependencies = [ - django - ]; - - pythonImportsCheck = [ - # "django_activity_stream" - "actstream" - ]; - - meta = { - description = "Generate generic activity streams from the actions on your site. Users can follow any actors' activities for personalized streams"; - homepage = "https://github.com/justquick/django-activity-stream"; - changelog = "https://github.com/justquick/django-activity-stream/blob/${src.rev}/CHANGELOG.rst"; - license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ ]; - }; -} diff --git a/machines/gerd/services/wger/wgerpkg/django-bootstrap-breadcrumbs.nix b/machines/gerd/services/wger/wgerpkg/django-bootstrap-breadcrumbs.nix deleted file mode 100644 index b821e2a..0000000 --- a/machines/gerd/services/wger/wgerpkg/django-bootstrap-breadcrumbs.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - setuptools, - wheel, - django, - six, -}: - -buildPythonPackage rec { - pname = "bootstrap-breadcrumbs"; - version = "0.9.2"; - pyproject = true; - - src = fetchFromGitHub { - owner = "prymitive"; - repo = "bootstrap-breadcrumbs"; - rev = version; - hash = "sha256-w6s3LL/skzz4EnWtdsa5GXeISrJzr4yQ8hm/gQMva1o="; - }; - - patches = [ - ./patches/breadcrumbs.patch - ]; - - build-system = [ - setuptools - wheel - ]; - - dependencies = [ - django - six - ]; - - pythonImportsCheck = [ - # "bootstrap_breadcrumbs" - ]; - - meta = { - description = "Django template tags for easy breadcrumbs using twitter bootstrap css classes or custom template"; - homepage = "https://github.com/prymitive/bootstrap-breadcrumbs"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ ]; - }; -} diff --git a/machines/gerd/services/wger/wgerpkg/django-email-verification.nix b/machines/gerd/services/wger/wgerpkg/django-email-verification.nix deleted file mode 100644 index 62a25eb..0000000 --- a/machines/gerd/services/wger/wgerpkg/django-email-verification.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - setuptools, - wheel, - asgiref, - coverage, - deprecation, - django, - iniconfig, - packaging, - pluggy, - pyjwt, - pytest, - pytest-django, - sqlparse, - validators, -}: - -buildPythonPackage rec { - pname = "django-email-verification"; - version = "unstable-2024-07-12"; - pyproject = true; - - src = fetchFromGitHub { - owner = "LeoneBacciu"; - repo = "django-email-verification"; - rev = "49e841b96e8bd39f0ad359a75be4711508ac4879"; - hash = "sha256-4hMSA1d6GOu7Xo7Qq1tBob4lW2zq1E4YaD8w0BnFfVc="; - }; - - build-system = [ - setuptools - wheel - ]; - - dependencies = [ - asgiref - coverage - deprecation - django - iniconfig - packaging - pluggy - pyjwt - pytest - pytest-django - sqlparse - validators - ]; - - pythonImportsCheck = [ - # "django_email_verification" - ]; - - meta = { - description = "A Django app that takes care of verifying a users's email address and activating their profile"; - homepage = "https://github.com/LeoneBacciu/django-email-verification"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ ]; - }; -} diff --git a/machines/gerd/services/wger/wgerpkg/django-recaptcha.nix b/machines/gerd/services/wger/wgerpkg/django-recaptcha.nix deleted file mode 100644 index 1903e8c..0000000 --- a/machines/gerd/services/wger/wgerpkg/django-recaptcha.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - setuptools, - wheel, - django, - coveralls, - tox, -}: - -buildPythonPackage rec { - pname = "django-recaptcha"; - version = "4.0.0"; - pyproject = true; - - src = fetchFromGitHub { - owner = "django-recaptcha"; - repo = "django-recaptcha"; - rev = version; - hash = "sha256-B6Z9oKcMjSh+zE28k0ipoBppm9dD+Moa+PAZqXVabpA="; - }; - - build-system = [ - setuptools - wheel - ]; - - dependencies = [ - django - coveralls - tox - ]; - - pythonImportsCheck = [ - # "django_recaptcha" - ]; - - meta = { - description = "Django reCAPTCHA form field/widget integration app"; - homepage = "https://github.com/django-recaptcha/django-recaptcha"; - changelog = "https://github.com/django-recaptcha/django-recaptcha/blob/${src.rev}/CHANGELOG.md"; - license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ ]; - }; -} diff --git a/machines/gerd/services/wger/wgerpkg/django-sortedm2m.nix b/machines/gerd/services/wger/wgerpkg/django-sortedm2m.nix deleted file mode 100644 index 72f895c..0000000 --- a/machines/gerd/services/wger/wgerpkg/django-sortedm2m.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - setuptools, - wheel, - coverage, - isort, - pycodestyle, - pylint-django, -}: - -buildPythonPackage rec { - pname = "django-sortedm2m"; - version = "4.0.0"; - pyproject = true; - - src = fetchFromGitHub { - owner = "jazzband"; - repo = "django-sortedm2m"; - rev = version; - hash = "sha256-Jr3C6teU4On2PiJJV9vW4EEPEuknNCZRVMDMmrs6VY8="; - }; - - build-system = [ - setuptools - wheel - ]; - - dependencies = [ - coverage - isort - pycodestyle - pylint-django - setuptools - ]; - - pythonImportsCheck = [ - # "django_sortedm2m" - ]; - - meta = { - description = "A transparent sorted ManyToMany field for django"; - homepage = "https://github.com/jazzband/django-sortedm2m"; - changelog = "https://github.com/jazzband/django-sortedm2m/blob/${src.rev}/CHANGES.rst"; - license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ ]; - }; -} diff --git a/machines/gerd/services/wger/wgerpkg/frontend.nix b/machines/gerd/services/wger/wgerpkg/frontend.nix deleted file mode 100644 index 16ee12c..0000000 --- a/machines/gerd/services/wger/wgerpkg/frontend.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ - lib, - python3, - fetchFromGitHub, - mkYarnPackage, - fetchYarnDeps, - sass, - stdenv, - yarn, - fixup-yarn-lock, -}: - -let - src = fetchFromGitHub { - owner = "wger-project"; - repo = "wger"; - rev = "bfca74e88f6c9ff6e917e0ba0e8e9c782ae0047b"; - hash = "sha256-VuVKgkNp6Omiag72lOn6p51kC/jvApX/kRAPpK95U7w="; - }; - - offlineCache = fetchYarnDeps { - yarnLock = "${src}/yarn.lock"; - hash = "sha256-olRU6ZGh6bpZ/WfwIKeREJRGd3oo7kEffFx8+4+7s5k="; - }; -in -stdenv.mkDerivation { - pname = "tetrio-plus"; - version = "1.0.0"; - - src = src; - - nativeBuildInputs = [ - yarn - fixup-yarn-lock - sass - ]; - - buildPhase = '' - runHook preBuild - export HOME=$(mktemp -d) - - yarn config --offline set yarn-offline-mirror ${offlineCache} - fixup-yarn-lock yarn.lock - yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive - - sass wger/core/static/scss/main.scss wger/core/static/yarn/bootstrap-compiled.css - - runHook postBuild - ''; - - installPhase = '' - mkdir -p $out - cp -a wger/core/static $out/static - ''; - - meta = { - description = ""; - homepage = "https://github.com/wger-project/wger"; - license = lib.licenses.agpl3Only; - maintainers = with lib.maintainers; [ ]; - mainProgram = "wger"; - }; -} diff --git a/machines/gerd/services/wger/wgerpkg/openfoodfacts.nix b/machines/gerd/services/wger/wgerpkg/openfoodfacts.nix deleted file mode 100644 index 45a58ae..0000000 --- a/machines/gerd/services/wger/wgerpkg/openfoodfacts.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - poetry-core, - pydantic, - requests, - tqdm, - pillow, - redis, -}: - -buildPythonPackage rec { - pname = "openfoodfacts-python"; - version = "2.2.0"; - pyproject = true; - - src = fetchFromGitHub { - owner = "openfoodfacts"; - repo = "openfoodfacts-python"; - rev = "v${version}"; - hash = "sha256-aG+zbFr7lhh5OCdPe7h2XJSwok7sdrnpsEBzPgJ6Bas="; - }; - - build-system = [ - poetry-core - ]; - - dependencies = [ - pydantic - requests - tqdm - ]; - - optional-dependencies = { - Pillow = [ - pillow - ]; - redis = [ - redis - ]; - }; - - pythonImportsCheck = [ - "openfoodfacts" - ]; - - meta = { - description = "Python package for Open Food Facts"; - homepage = "https://github.com/openfoodfacts/openfoodfacts-python"; - changelog = "https://github.com/openfoodfacts/openfoodfacts-python/blob/${src.rev}/CHANGELOG.md"; - license = with lib.licenses; [ mit asl20 ]; - maintainers = with lib.maintainers; [ ]; - }; -} diff --git a/machines/gerd/services/wger/wgerpkg/patches/breadcrumbs.patch b/machines/gerd/services/wger/wgerpkg/patches/breadcrumbs.patch deleted file mode 100644 index 23eb384..0000000 --- a/machines/gerd/services/wger/wgerpkg/patches/breadcrumbs.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/django_bootstrap_breadcrumbs/templatetags/django_bootstrap_breadcrumbs.py b/django_bootstrap_breadcrumbs/templatetags/django_bootstrap_breadcrumbs.py -index 0e98c65..4a4c13e 100644 ---- a/django_bootstrap_breadcrumbs/templatetags/django_bootstrap_breadcrumbs.py -+++ b/django_bootstrap_breadcrumbs/templatetags/django_bootstrap_breadcrumbs.py -@@ -12,7 +12,7 @@ from inspect import ismethod - - from django.utils.html import escape - from django.utils.safestring import mark_safe --from django.utils.encoding import smart_text -+from django.utils.encoding import smart_str - from django.db.models import Model - from django.conf import settings - from django import template, VERSION -@@ -148,7 +148,7 @@ def render_breadcrumbs(context, *args): - kwargs=view_kwargs, current_app=current_app) - except NoReverseMatch: - url = viewname -- links.append((url, smart_text(label) if label else label)) -+ links.append((url, smart_str(label) if label else label)) - - if not links: - return '' diff --git a/machines/gerd/services/wger/wgerpkg/patches/manage.patch b/machines/gerd/services/wger/wgerpkg/patches/manage.patch deleted file mode 100644 index c326ead..0000000 --- a/machines/gerd/services/wger/wgerpkg/patches/manage.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/manage.py b/manage.py -index 873291be6..368de89fe 100644 ---- a/manage.py -+++ b/manage.py -@@ -2,6 +2,7 @@ - - # Standard Library - import sys -+import os - - # Django - from django.core.management import execute_from_command_line -@@ -12,13 +13,20 @@ from wger.tasks import ( - setup_django_environment, - ) - -- --if __name__ == '__main__': -+def main(): - # If user passed the settings flag ignore the default wger settings -- if not any('--settings' in s for s in sys.argv): -+ settings_file = os.getenv("WGER_SETTINGS") -+ -+ if not any('--settings' in s for s in sys.argv) and not settings_file: - setup_django_environment(get_path('settings.py')) - -+ if settings_file: -+ setup_django_environment(get_path(settings_file)) -+ - # Alternative to above - # os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") - - execute_from_command_line(sys.argv) -+ -+if __name__ == '__main__': -+ main() diff --git a/machines/gerd/services/wger/wgerpkg/patches/pyproject.patch b/machines/gerd/services/wger/wgerpkg/patches/pyproject.patch deleted file mode 100644 index b73b054..0000000 --- a/machines/gerd/services/wger/wgerpkg/patches/pyproject.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/pyproject.toml b/pyproject.toml -index f10460b1e..62377bd9c 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -35,7 +35,8 @@ Issues = "https://github.com/wger-project/wger/issues" - Changelog = "https://wger.readthedocs.io/en/latest/changelog.html" - - [project.scripts] --wger = "wger.__main__:main" -+wger = "wger.tasks:main" -+manage = "wger.manage:main" - - [tool.setuptools] - include-package-data = false -@@ -47,6 +48,9 @@ dependencies = { file = ["requirements.txt"] } - [tool.distutils.bdist_wheel] - universal = 1 - -+[tool.hatch.build.targets.wheel.force-include] -+"wger/settings_global.py" = "wger/settings_global.py" -+ - - [tool.ruff] - # Exclude a variety of commonly ignored directories. diff --git a/machines/gerd/services/wger/wgerpkg/patches/tasks.patch b/machines/gerd/services/wger/wgerpkg/patches/tasks.patch deleted file mode 100644 index 2f8d150..0000000 --- a/machines/gerd/services/wger/wgerpkg/patches/tasks.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/wger/tasks.py b/wger/tasks.py -index b1b4b7c65..50bf95b7c 100644 ---- a/wger/tasks.py -+++ b/wger/tasks.py -@@ -31,7 +31,7 @@ from django.utils.crypto import get_random_string - - # Third Party - import requests --from invoke import task -+from invoke import task, Program, Collection - from tqdm import tqdm - - -@@ -358,3 +358,20 @@ def database_exists(): - sys.exit(0) - else: - return True -+ -+def main(): -+ ns = Collection( -+ start, -+ bootstrap, -+ create_settings, -+ create_or_reset_admin, -+ migrate_db, -+ load_fixtures, -+ load_online_fixtures, -+ ) -+ program = Program(namespace=ns) -+ program.run() -+ -+ -+if __name__ == "__main__": -+ main() - diff --git a/shared/sources/default.nix b/shared/sources/default.nix index d268f1b..5611e31 100644 --- a/shared/sources/default.nix +++ b/shared/sources/default.nix @@ -9,15 +9,15 @@ in sources // { name = "nixpkgs-patched"; patches = [ # tmp - lldap: 0.5.1-unstable-2024-08-09 -> 0.5.1-unstable-2024-10-30 - # (pkgs.fetchpatch { - # url = "https://github.com/NixOS/nixpkgs/pull/352840.patch"; - # sha256 = "sha256-O4zxn4AgUrggCkqUEkmVsUAbMTL/Jhki6Q+j1mhHWLw="; - # }) + (pkgs.fetchpatch { + url = "https://github.com/NixOS/nixpkgs/pull/352840.patch"; + sha256 = "sha256-O4zxn4AgUrggCkqUEkmVsUAbMTL/Jhki6Q+j1mhHWLw="; + }) # tmp - stalwart-mail.webadmin: pin wasm-bindgen-cli version - # (pkgs.fetchpatch { - # url = "https://github.com/NixOS/nixpkgs/pull/353360.patch"; - # sha256 = "sha256-WPNnvVmtySyEk58kVIYWVx3VN8MhX4v2ITLLnUGhpz4="; - # }) + (pkgs.fetchpatch { + url = "https://github.com/NixOS/nixpkgs/pull/353360.patch"; + sha256 = "sha256-WPNnvVmtySyEk58kVIYWVx3VN8MhX4v2ITLLnUGhpz4="; + }) ]; }; } diff --git a/shared/sources/sources.json b/shared/sources/sources.json index 14539d0..d55e22a 100644 --- a/shared/sources/sources.json +++ b/shared/sources/sources.json @@ -17,10 +17,10 @@ "homepage": "", "owner": "nix-community", "repo": "disko", - "rev": "2814a5224a47ca19e858e027f7e8bff74a8ea9f1", - "sha256": "1ayxw37arc92frzq0080w7kixdmqbq4jm8a19nrgivb70ra1mqys", + "rev": "856a2902156ba304efebd4c1096dbf7465569454", + "sha256": "0r5yxld3yshrd09hblwzf9sadsa6p8nc24xadpajxldk2pskdmmi", "type": "tarball", - "url": "https://github.com/nix-community/disko/archive/2814a5224a47ca19e858e027f7e8bff74a8ea9f1.tar.gz", + "url": "https://github.com/nix-community/disko/archive/856a2902156ba304efebd4c1096dbf7465569454.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "impermanence": { @@ -29,10 +29,10 @@ "homepage": "", "owner": "nix-community", "repo": "impermanence", - "rev": "3ed3f0eaae9fcc0a8331e77e9319c8a4abd8a71a", - "sha256": "1k30ig9b5bx51f0y617yvcn61bgpahf8r0i55mnl3hy6nqjbfw07", + "rev": "0d09341beeaa2367bac5d718df1404bf2ce45e6f", + "sha256": "0s6wb425pp2906mavcpwk9mnjw94xhzmvhqf711986kzlbjlflav", "type": "tarball", - "url": "https://github.com/nix-community/impermanence/archive/3ed3f0eaae9fcc0a8331e77e9319c8a4abd8a71a.tar.gz", + "url": "https://github.com/nix-community/impermanence/archive/0d09341beeaa2367bac5d718df1404bf2ce45e6f.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { @@ -41,10 +41,10 @@ "homepage": null, "owner": "NixOS", "repo": "nixpkgs", - "rev": "ac35b104800bff9028425fec3b6e8a41de2bbfff", - "sha256": "1fbj7shlmviilmgz5z2gp59j6xwgdr01jfh75qhixx06kib4305p", + "rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d", + "sha256": "0mny4jzyimbfr2amc751nl2rwdlxz6wffadvygk8ra225sr3ma0f", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/ac35b104800bff9028425fec3b6e8a41de2bbfff.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/7ffd9ae656aec493492b44d0ddfb28e79a1ea25d.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } }