1

add an overlay for e11sync

This commit is contained in:
Motiejus Jakštys 2024-01-20 12:04:23 +02:00
parent ab678b3f6f
commit 9bc1db9fe0
3 changed files with 22 additions and 16 deletions

View File

@ -38,7 +38,7 @@ SECRET_KEY = _SECRET_KEY
DEBUG = _DEBUG DEBUG = _DEBUG
ALLOWED_HOSTS = ["127.0.0.1", "localhost", "11sync.net"] ALLOWED_HOSTS = ["127.0.0.1", "localhost", "11sync.net", "admin.11sync.net"]
INTERNAL_IPS = ["127.0.0.1"] INTERNAL_IPS = ["127.0.0.1"]

View File

@ -34,11 +34,12 @@
pre-commit-hooks, pre-commit-hooks,
geoip2-tarball, geoip2-tarball,
... ...
}: }: let
overlays = import ./overlays.nix geoip2-tarball;
in
flake-utils.lib.eachDefaultSystem (system: let flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system overlays;
overlays = import ./overlays.nix geoip2-tarball;
}; };
in { in {
packages = { packages = {
@ -125,5 +126,7 @@
]; ];
}; };
nixosModules.e11sync = import ./modules/e11sync geoip2-tarball; nixosModules.e11sync = import ./modules/e11sync geoip2-tarball;
overlays.default = overlays;
}; };
} }

View File

@ -1,17 +1,20 @@
# If you consider exposing this overlay to the users, remove
# django overwrite from here.
geoip2-tarball: [ geoip2-tarball: [
(_: super: { (_: super: let
python3 = super.python3.override { withDjango5 = super.extend (
packageOverrides = _: python-super: { _: super: {
django = python-super.django_5; python3 = super.python3.override {
}; packageOverrides = _: python-super: {
}; django = python-super.django_5;
geoip-mmdb = super.callPackage ./pkgs/geoip-mmdb.nix { };
};
}
);
in {
geoip-mmdb = withDjango5.callPackage ./pkgs/geoip-mmdb.nix {
inherit geoip2-tarball; inherit geoip2-tarball;
}; };
e11sync-static = super.callPackage ./pkgs/e11sync-static.nix {}; e11sync-static = withDjango5.callPackage ./pkgs/e11sync-static.nix {};
e11sync-frontend = super.callPackage ./pkgs/e11sync-frontend.nix {}; e11sync-frontend = withDjango5.callPackage ./pkgs/e11sync-frontend.nix {};
e11sync-backend = super.callPackage ./pkgs/e11sync-backend.nix {}; e11sync-backend = withDjango5.callPackage ./pkgs/e11sync-backend.nix {};
}) })
] ]