diff --git a/hive.nix b/hive.nix index c13ae22..af77dbe 100644 --- a/hive.nix +++ b/hive.nix @@ -11,8 +11,6 @@ let sources = import ./sources.nix; - inherit (sources) bootstrapNixpkgs; - lib = sources.fullLib; inherit (lib.extra) mapSingleFuse; @@ -44,7 +42,7 @@ let mkNixpkgsConfig = system: { - nixos = _: { }; # TODO: add nix-pkgs overlay here + nixos = _: { overlays = [ (import "${sources.nix-pkgs}/overlay.nix").default ]; }; zyxel-nwa50ax = mkLiminixConfig system; netconf = _: { }; } diff --git a/machines/nixos/compute01/dgsi/default.nix b/machines/nixos/compute01/dgsi/default.nix index 3c72c41..d2e5fa1 100644 --- a/machines/nixos/compute01/dgsi/default.nix +++ b/machines/nixos/compute01/dgsi/default.nix @@ -14,30 +14,7 @@ let inherit (lib) toLower; - python = - let - python3 = pkgs.python312; - nix-pkgs = import sources.nix-pkgs { inherit pkgs python3; }; - in - python3.override { - packageOverrides = _: _: { - inherit (nix-pkgs) - django-allauth - django-allauth-cas - django-browser-reload - django-bulma-forms - django-sass-processor - django-sass-processor-dart-sass - django-unfold - pykanidm - python-cas - loadcredential - xlwt - ; - }; - }; - - pythonEnv = python.withPackages ( + pythonEnv = pkgs.python312.withPackages ( ps: [ ps.django diff --git a/machines/nixos/web02/cas-eleves/default.nix b/machines/nixos/web02/cas-eleves/default.nix index 47a771e..45473e4 100644 --- a/machines/nixos/web02/cas-eleves/default.nix +++ b/machines/nixos/web02/cas-eleves/default.nix @@ -19,22 +19,13 @@ let port = 9889; - python3 = - let - nix-pkgs = import sources.nix-pkgs { - inherit pkgs; - python3 = pkgs.python312; - }; - in - pkgs.python312.override { - packageOverrides = _: _: { - inherit (nix-pkgs) django-browser-reload django-bulma-forms loadcredential; - - django-cas-server = nix-pkgs.django-cas-server.overridePythonAttrs (_: { - patches = [ ./01-pytest-cas.patch ]; - }); - }; + python3 = pkgs.python312.override { + packageOverrides = _: prev: { + django-cas-server = prev.django-cas-server.overridePythonAttrs (_: { + patches = [ ./01-pytest-cas.patch ]; + }); }; + }; pythonEnv = python3.withPackages (ps: [ ps.django diff --git a/machines/nixos/web02/kadenios/default.nix b/machines/nixos/web02/kadenios/default.nix index 4b026e1..6602de1 100644 --- a/machines/nixos/web02/kadenios/default.nix +++ b/machines/nixos/web02/kadenios/default.nix @@ -16,28 +16,11 @@ let host = "vote.dgnum.eu"; port = 9888; - python3 = - let - nix-pkgs = import sources.nix-pkgs { inherit pkgs; }; - in - pkgs.python3.override { - packageOverrides = _: _: { - inherit (nix-pkgs) - authens - django-background-tasks - django-browser-reload - django-bulma-forms - django-translated-fields - loadcredential - ; - }; - }; - pythonEnv = { debug ? false, }: - python3.withPackages ( + pkgs.python3.withPackages ( ps: [ ps.django diff --git a/machines/nixos/web03/django-apps/annuaire.nix b/machines/nixos/web03/django-apps/annuaire.nix index c34ac47..f533b16 100644 --- a/machines/nixos/web03/django-apps/annuaire.nix +++ b/machines/nixos/web03/django-apps/annuaire.nix @@ -3,16 +3,10 @@ # SPDX-License-Identifier: EUPL-1.2 { - pkgs, - sources, config, ... }: -let - nix-pkgs = import sources.nix-pkgs { inherit pkgs; }; -in - { services.django-apps.sites.annuaire = { source = "https://git.dgnum.eu/DGNum/annuaire-eleves"; @@ -26,10 +20,6 @@ in webHookSecret = config.age.secrets."webhook-annuaire_token".path; - python = pkgs.python3.override { - packageOverrides = _: _: { inherit (nix-pkgs) authens loadcredential; }; - }; - dependencies = ps: [ ps.django ps.pillow diff --git a/machines/nixos/web03/django-apps/bocal.nix b/machines/nixos/web03/django-apps/bocal.nix index 4b0841c..06b86a5 100644 --- a/machines/nixos/web03/django-apps/bocal.nix +++ b/machines/nixos/web03/django-apps/bocal.nix @@ -3,16 +3,10 @@ # SPDX-License-Identifier: EUPL-1.2 { - pkgs, - sources, config, ... }: -let - nix-pkgs = import sources.nix-pkgs { inherit pkgs; }; -in - { services.django-apps.sites.bocal = { source = "https://git.dgnum.eu/DGNum/www-bocal"; @@ -26,10 +20,6 @@ in webHookSecret = config.age.secrets."webhook-bocal_token".path; - python = pkgs.python3.override { - packageOverrides = _: _: { inherit (nix-pkgs) django-cas-ng django-solo loadcredential; }; - }; - dependencies = ps: [ ps.django ps.django-cas-ng diff --git a/machines/nixos/web03/django-apps/ernestophone.nix b/machines/nixos/web03/django-apps/ernestophone.nix index 062e914..ef162da 100644 --- a/machines/nixos/web03/django-apps/ernestophone.nix +++ b/machines/nixos/web03/django-apps/ernestophone.nix @@ -3,16 +3,10 @@ # SPDX-License-Identifier: EUPL-1.2 { - pkgs, - sources, config, ... }: -let - nix-pkgs = import sources.nix-pkgs { inherit pkgs; }; -in - { services.django-apps.sites.ernestophone = { source = "https://git.dgnum.eu/DGNum/ernestophone.ens.fr"; @@ -31,17 +25,6 @@ in webHookSecret = config.age.secrets."webhook-ernestophone_token".path; - python = pkgs.python3.override { - packageOverrides = _: _: { - inherit (nix-pkgs) - django-avatar - django-cas-ng - django-solo - loadcredential - ; - }; - }; - dependencies = ps: [ ps.django ps.django-avatar diff --git a/machines/nixos/web03/django-apps/gestiojeux.nix b/machines/nixos/web03/django-apps/gestiojeux.nix index e7d94a9..5562c75 100644 --- a/machines/nixos/web03/django-apps/gestiojeux.nix +++ b/machines/nixos/web03/django-apps/gestiojeux.nix @@ -3,16 +3,10 @@ # SPDX-License-Identifier: EUPL-1.2 { - pkgs, - sources, config, ... }: -let - nix-pkgs = import sources.nix-pkgs { inherit pkgs; }; -in - { services.django-apps.sites.gestiojeux = { source = "https://git.dgnum.eu/DGNum/gestiojeux"; @@ -31,18 +25,8 @@ in module = "gestiojeux"; }; - python = pkgs.python3.override { - packageOverrides = _: _: { - inherit (nix-pkgs) - django-autoslug - django-cas-ng - loadcredential - markdown-icons - ; - }; - }; - django = ps: ps.django_4; + dependencies = ps: [ ps.django-autoslug ps.loadcredential diff --git a/machines/nixos/web03/django-apps/interludes.nix b/machines/nixos/web03/django-apps/interludes.nix index 61730e4..88f0f10 100644 --- a/machines/nixos/web03/django-apps/interludes.nix +++ b/machines/nixos/web03/django-apps/interludes.nix @@ -4,15 +4,9 @@ { config, - pkgs, - sources, ... }: -let - nix-pkgs = import sources.nix-pkgs { inherit pkgs; }; -in - { services.webhook.extraArgs = [ "-debug" ]; services.django-apps.sites.interludes = { @@ -36,10 +30,6 @@ in dbType = "sqlite"; - python = pkgs.python3.override { - packageOverrides = _: _: { inherit (nix-pkgs) python-cas loadcredential; }; - }; - django = ps: ps.django_4; dependencies = ps: [ ps.loadcredential diff --git a/machines/nixos/web03/django-apps/wikiens.nix b/machines/nixos/web03/django-apps/wikiens.nix index 1f6271c..a177f96 100644 --- a/machines/nixos/web03/django-apps/wikiens.nix +++ b/machines/nixos/web03/django-apps/wikiens.nix @@ -3,16 +3,10 @@ # SPDX-License-Identifier: EUPL-1.2 { - pkgs, - sources, config, ... }: -let - nix-pkgs = import sources.nix-pkgs { inherit pkgs; }; -in - { services.django-apps.sites.wikiens = { source = "https://git.dgnum.eu/DGNum/wiki-eleves"; @@ -26,17 +20,6 @@ in webHookSecret = config.age.secrets."webhook-wikiens_token".path; - python = pkgs.python3.override { - packageOverrides = _: _: { - inherit (nix-pkgs) - django-allauth - django-allauth-ens - django-wiki - loadcredential - ; - }; - }; - dependencies = ps: [ diff --git a/modules/nixos/django-apps/default.nix b/modules/nixos/django-apps/default.nix index 550c9ee..b95a4c8 100644 --- a/modules/nixos/django-apps/default.nix +++ b/modules/nixos/django-apps/default.nix @@ -392,10 +392,6 @@ in webhook = { enable = true; - package = pkgs.webhook.overrideAttrs (old: { - patches = (old.patches or [ ]) ++ [ ./01-webhook.patch ]; - }); - # extraArgs = [ "-debug" ]; # Only listen on localhost