1
Fork 0

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
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"]

View File

@ -34,11 +34,12 @@
pre-commit-hooks,
geoip2-tarball,
...
}:
}: let
overlays = import ./overlays.nix geoip2-tarball;
in
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = import ./overlays.nix geoip2-tarball;
inherit system overlays;
};
in {
packages = {
@ -125,5 +126,7 @@
];
};
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: [
(_: super: {
python3 = super.python3.override {
packageOverrides = _: python-super: {
django = python-super.django_5;
};
};
geoip-mmdb = super.callPackage ./pkgs/geoip-mmdb.nix {
(_: super: let
withDjango5 = super.extend (
_: super: {
python3 = super.python3.override {
packageOverrides = _: python-super: {
django = python-super.django_5;
};
};
}
);
in {
geoip-mmdb = withDjango5.callPackage ./pkgs/geoip-mmdb.nix {
inherit geoip2-tarball;
};
e11sync-static = super.callPackage ./pkgs/e11sync-static.nix {};
e11sync-frontend = super.callPackage ./pkgs/e11sync-frontend.nix {};
e11sync-backend = super.callPackage ./pkgs/e11sync-backend.nix {};
e11sync-static = withDjango5.callPackage ./pkgs/e11sync-static.nix {};
e11sync-frontend = withDjango5.callPackage ./pkgs/e11sync-frontend.nix {};
e11sync-backend = withDjango5.callPackage ./pkgs/e11sync-backend.nix {};
})
]