ctucx.git: nixfiles

ctucx' nixfiles

commit abe9541a92e63f3e408ac3a15481621a20002a99
parent 4056205106792fa615c7320a187365f63ea2f664
Author: Leah (ctucx) <git@ctu.cx>
Date: Sun, 27 Nov 2022 20:24:16 +0100

pkgs: refactor overlays
3 files changed, 26 insertions(+), 54 deletions(-)
M
pkgs/default.nix
|
35
++++++++++++++++++++++++++---------
D
pkgs/overlays/darwin.nix
|
28
----------------------------
D
pkgs/overlays/linux.nix
|
17
-----------------
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -2,15 +2,6 @@
 
 {
 
-  imports = (builtins.concatLists [
-    (if (currentSystem == "x86_64-linux") then [
-     ./overlays/linux.nix
-    ] else [])
-    (if (currentSystem == "aarch64-darwin") then [
-      ./overlays/darwin.nix
-    ] else [])
-  ]);
-
   nixpkgs.overlays = [
     (final: prev: {
       unstable               = inputs.nixpkgsUnstable.legacyPackages.${prev.system};

@@ -20,6 +11,12 @@
 
       agenix                 = inputs.agenix.defaultPackage."${currentSystem}";
 
+      pleroma                = prev.pleroma.overrideAttrs (old: {
+        patches = [
+         ./0001-PATCH-Separate-webfinger-domain-from-host-domain.patch
+        ];
+      });
+
       yabai                  = final.callPackage ./yabai.nix {};
       asitop                 = final.callPackage ./asitop.nix {};
       bgiparser              = final.callPackage ./bgiparser.nix {};

@@ -45,6 +42,26 @@
       mobile-coverage-map    = final.callPackage ./mobile-coverage-map {};
 
     })
+    (if (currentSystem == "aarch64-darwin") then (final: prev: {
+
+      # jemalloc depends on llvm10 which is doesn't supports darwin-aarch64
+      # however bind seems to build fine w/o jemalloc
+      bind = prev.bind.override { jemalloc = null; };
+
+      # disable pyopenssl-dependency on cloudscraper since it is broken on aarch64
+      python3 = prev.python3.override {
+        packageOverrides = python3-final: python3-prev: {
+          cloudscraper = python3-prev.cloudscraper.override {
+            requests-toolbelt = (python3-prev.requests-toolbelt.override {
+              pyopenssl = null;
+            }).overridePythonAttrs (old: {
+              doCheck = false;
+            });
+          };
+        };
+       };
+
+    }) else (final: prev: {}))
   ];
 
 }
diff --git a/pkgs/overlays/darwin.nix b/pkgs/overlays/darwin.nix
@@ -1,28 +0,0 @@
-{ pkgs, lib, ... }:
-
-{
-
-  nixpkgs.overlays = [
-    (final: prev: {
-
-      # jemalloc depends on llvm10 which is doesn't supports darwin-aarch64
-      # however bind seems to build fine w/o jemalloc
-      bind = prev.bind.override { jemalloc = null; };
-
-      # disable pyopenssl-dependency on cloudscraper since it is broken on aarch64
-      python3 = prev.python3.override {
-        packageOverrides = python3-final: python3-prev: {
-          cloudscraper = python3-prev.cloudscraper.override {
-            requests-toolbelt = (python3-prev.requests-toolbelt.override {
-              pyopenssl = null;
-            }).overridePythonAttrs (old: {
-              doCheck = false;
-            });
-          };
-        };
-       };
-
-    })
-  ];
-
-}
diff --git a/pkgs/overlays/linux.nix b/pkgs/overlays/linux.nix
@@ -1,17 +0,0 @@
-{ pkgs, lib, ... }:
-
-{
-
-  nixpkgs.overlays = [
-    (final: prev: {
-
-      pleroma = prev.pleroma.overrideAttrs (old: {
-        patches = [
-         ../0001-PATCH-Separate-webfinger-domain-from-host-domain.patch
-        ];
-      });
-
-    })
-  ];
-
-}