diff --git a/hosts/nuc/default.nix b/hosts/nuc/default.nix index 1aa3223..67bd696 100644 --- a/hosts/nuc/default.nix +++ b/hosts/nuc/default.nix @@ -12,7 +12,6 @@ ./modules/matrix ./modules/mautrix-telegram ./modules/monitoring - ./modules/seafile ./modules/torrent ./modules/vaultwarden ./modules/caddy diff --git a/hosts/nuc/modules/seafile/default.nix b/hosts/nuc/modules/seafile/default.nix deleted file mode 100644 index 9136cf9..0000000 --- a/hosts/nuc/modules/seafile/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ config, pkgs, ... }: -let - domain = "seafile.${config.networking.domain}"; -in -{ - services.seafile = { - enable = true; - adminEmail = "admin@rfive.de"; - initialAdminPassword = "unused garbage"; - ccnetSettings.General.SERVICE_URL = "https://${domain}"; - ccnetSettings.General.FILE_SERVER_ROOT = "https://${domain}/seafhttp"; - seafileSettings.fileserver.port = 8083; - seahubExtraConf = '' - ENABLE_OAUTH = True - OAUTH_ENABLE_INSECURE_TRANSPORT = True - - OAUTH_CLIENT_ID = "seafile" - with open('/var/lib/seafile/.oidcSecret') as f: - OAUTH_CLIENT_SECRET = f.readline().rstrip() - OAUTH_REDIRECT_URL = 'https://seafile.rfive.de/oauth/callback/' - - OAUTH_PROVIDER_DOMAIN = 'seafile.rfive.de' - OAUTH_AUTHORIZATION_URL = 'https://auth.rfive.de/application/o/authorize/' - OAUTH_TOKEN_URL = 'https://auth.rfive.de/application/o/token/' - OAUTH_USER_INFO_URL = 'https://auth.rfive.de/application/o/userinfo/' - OAUTH_SCOPE = [ "openid", "profile", "email"] - OAUTH_ATTRIBUTE_MAP = { - "id": (False, "not used"), - "name": (False, "full name"), - "email": (True, "email"), - } - ''; - }; - services.caddy.virtualHosts."${domain}".extraConfig = '' - redir /accounts/login /oauth/login - reverse_proxy unix//run/seahub/gunicorn.sock - route /media/* { - root * ${pkgs.seahub} - } - - route /seafhttp/* { - uri strip_prefix /seafhttp - reverse_proxy 127.0.0.1:${toString config.services.seafile.seafileSettings.fileserver.port} - } - ''; -} diff --git a/overlays/default.nix b/overlays/default.nix index 8f8c7ad..1cd7f2b 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -2,9 +2,6 @@ _final: prev: let inherit (prev) callPackage; inherit (prev) fetchFromGitHub; - inherit (prev) fetchPypi; - inherit (prev) makeWrapper; - inherit (prev) python3Packages; in { @@ -36,80 +33,4 @@ in gnome-break-timer = callPackage ../pkgs/gnome-break-timer { }; jmri = callPackage ../pkgs/jmri { }; adguardian-term = callPackage ../pkgs/adguardian-term { }; - - # upstream package is broken and can't be fixed by overriding attrs. so I just completely redo it in here - seahub = (python3Packages.buildPythonApplication rec { - pname = "seahub"; - version = "11.0.1"; - format = "other"; - src = fetchFromGitHub { - owner = "haiwen"; - repo = "seahub"; - rev = "v11.0.1-pro"; - sha256 = "sha256-dxMvbiAdECMZIf+HgA5P2gZYI9l+k+nhmdzfg90037A="; - }; - - - dontBuild = true; - - doCheck = false; # disabled because it requires a ccnet environment - - nativeBuildInputs = [ - makeWrapper - ]; - - propagatedBuildInputs = with python3Packages; [ - django - future - django-compressor - django-statici18n - django-webpack-loader - django-simple-captcha - django-picklefield - django-formtools - mysqlclient - pillow - python-dateutil - djangorestframework - openpyxl - requests - requests-oauthlib - chardet - pyjwt - pycryptodome - qrcode - pysearpc - seaserv - gunicorn - markdown - bleach - # python-ldap - pyopenssl - (buildPythonPackage rec { - pname = "djangosaml2"; - version = "1.7.0"; - doCheck = false; - propagatedBuildInputs = [ - pysaml2 - django - defusedxml - ]; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-WiMl2UvbOskLA5o5LXPrBF2VktlDnlBNdc42eZ62Fko="; - }; - }) - ]; - - installPhase = '' - cp -dr --no-preserve='ownership' . $out/ - wrapProgram $out/manage.py \ - --prefix PYTHONPATH : "$PYTHONPATH:$out/thirdpart:" - ''; - - passthru = rec { - python = prev.python3; - pythonPath = python.pkgs.makePythonPath propagatedBuildInputs; - }; - }); } diff --git a/users/rouven/modules/packages.nix b/users/rouven/modules/packages.nix index 514638f..3ed7da5 100644 --- a/users/rouven/modules/packages.nix +++ b/users/rouven/modules/packages.nix @@ -11,7 +11,6 @@ pcmanfm xdg-utils # used for xdg-open appimage-run - seafile-client # graphics (zathura.override { plugins = [ zathuraPkgs.zathura_pdf_mupdf ]; })