commit 9bc1db9fe07655f3a7ad565eb208b8ac5b9fa538 (tree)
parent ab678b3f6f5b7a7974d1f1e49eebcee69d2b76d8
Author: Motiejus Jakštys <motiejus@jakstys.lt>
Date: Sat, 20 Jan 2024 12:04:23 +0200
add an overlay for e11sync
Diffstat:
3 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/app/e11sync/settings.py b/app/e11sync/settings.py
@@ -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"]
diff --git a/flake.nix b/flake.nix
@@ -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;
};
}
diff --git a/overlays.nix b/overlays.nix
@@ -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 {};
})
]