summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-04-28 23:21:11 +0200
committerAlan Pearce2024-04-29 20:57:07 +0200
commit75a4e09f1d241f7882a86d7f9c4aa1804a981209 (patch)
treef56e407f99f9bbf696dd229e79f56d3664461a15
parent21398bece441d9afaa8e74539d993c3e976ebce0 (diff)
downloadnixfiles-75a4e09f1d241f7882a86d7f9c4aa1804a981209.tar.lz
nixfiles-75a4e09f1d241f7882a86d7f9c4aa1804a981209.tar.zst
nixfiles-75a4e09f1d241f7882a86d7f9c4aa1804a981209.zip
move overlays to root folder
-rw-r--r--flake.nix6
-rw-r--r--overlays/cgit-pink/default.nix5
-rw-r--r--overlays/cgit-pink/set-default-branch-main.patch (renamed from patches/cgit-pink.patch)0
-rw-r--r--overlays/emacs.nix4
-rw-r--r--overlays/extra-packages.nix (renamed from user/overlays/extra-packages.nix)14
-rw-r--r--overlays/firefox.nix4
-rw-r--r--overlays/htmlformat/default.nix3
-rw-r--r--overlays/htmlformat/htmlformat.nix (renamed from packages/htmlformat/default.nix)0
-rw-r--r--overlays/rofi.nix7
-rw-r--r--system/linde.nix7
-rwxr-xr-xsystem/nanopi.nix1
-rw-r--r--user/settings/development/web.nix2
-rw-r--r--user/settings/nix.nix3
-rw-r--r--user/settings/nixpkgs.nix6
-rw-r--r--user/settings/rofi.nix9
15 files changed, 39 insertions, 32 deletions
diff --git a/flake.nix b/flake.nix
index 8f5a7d36..ed8ccc47 100644
--- a/flake.nix
+++ b/flake.nix
@@ -50,11 +50,7 @@
       };
     in
     {
-      overlays.default = final: prev: {
-        self = {
-          htmlformat = final.callPackage ./packages/htmlformat { };
-        };
-      };
+      overlays.default = import ./overlays/htmlformat;
 
       nixosConfigurations.prefect = nixpkgs.lib.nixosSystem {
         system = utils.lib.system.x86_64-linux;
diff --git a/overlays/cgit-pink/default.nix b/overlays/cgit-pink/default.nix
new file mode 100644
index 00000000..ba62b718
--- /dev/null
+++ b/overlays/cgit-pink/default.nix
@@ -0,0 +1,5 @@
+self: super: {
+  cgit-pink = super.cgit-pink.overrideAttrs (old: {
+    patches = [ ./cgit-pink.patch ];
+  });
+}
diff --git a/patches/cgit-pink.patch b/overlays/cgit-pink/set-default-branch-main.patch
index 0e91525e..0e91525e 100644
--- a/patches/cgit-pink.patch
+++ b/overlays/cgit-pink/set-default-branch-main.patch
diff --git a/overlays/emacs.nix b/overlays/emacs.nix
new file mode 100644
index 00000000..679e9a1d
--- /dev/null
+++ b/overlays/emacs.nix
@@ -0,0 +1,4 @@
+let
+  sources = import ../nix/sources.nix;
+in
+import sources.emacs-overlay
diff --git a/user/overlays/extra-packages.nix b/overlays/extra-packages.nix
index ebe4fb0c..d0717756 100644
--- a/user/overlays/extra-packages.nix
+++ b/overlays/extra-packages.nix
@@ -9,6 +9,20 @@ self: super: {
         }
     )
   );
+  vimPlugins = super.vimPlugins.extend (final: prev: {
+    coc-tabnine =
+      let
+        inherit (super) tabnine;
+      in
+      prev.coc-tabnine.overrideAttrs {
+        buildInputs = [ tabnine ];
+
+        postFixup = ''
+          mkdir -p $target/binaries/${tabnine.version}
+          ln -s ${tabnine}/bin/ $target/binaries/${tabnine.version}/${tabnine.passthru.platform}
+        '';
+      };
+  });
   enchant = super.enchant.overrideAttrs (old: {
     configureFlags = old.configureFlags ++ [ "--without-hspell" ]
       # builtins.filter (c: c != "--with-hspell") old.configureFlags
diff --git a/overlays/firefox.nix b/overlays/firefox.nix
new file mode 100644
index 00000000..b3b346bf
--- /dev/null
+++ b/overlays/firefox.nix
@@ -0,0 +1,4 @@
+self: super: {
+  firefox-bin-unwrapped = super.firefox-bin-unwrapped.override { systemLocale = "en-GB"; };
+  firefox-devedition-bin-unwrapped = super.firefox-devedition-bin-unwrapped.override { systemLocale = "en-GB"; };
+}
diff --git a/overlays/htmlformat/default.nix b/overlays/htmlformat/default.nix
new file mode 100644
index 00000000..93292c76
--- /dev/null
+++ b/overlays/htmlformat/default.nix
@@ -0,0 +1,3 @@
+self: super: {
+  htmlformat = super.callPackage ./htmlformat.nix { };
+}
diff --git a/packages/htmlformat/default.nix b/overlays/htmlformat/htmlformat.nix
index aa124ee5..aa124ee5 100644
--- a/packages/htmlformat/default.nix
+++ b/overlays/htmlformat/htmlformat.nix
diff --git a/overlays/rofi.nix b/overlays/rofi.nix
new file mode 100644
index 00000000..53efd0f8
--- /dev/null
+++ b/overlays/rofi.nix
@@ -0,0 +1,7 @@
+self: super: {
+  rofi = super.rofi.overrideAttrs (oldAttrs: rec {
+    postInstall = ''
+      ln $out/bin/rofi $out/bin/dmenu
+    '';
+  });
+}
diff --git a/system/linde.nix b/system/linde.nix
index 96ff92f8..7afdca9c 100644
--- a/system/linde.nix
+++ b/system/linde.nix
@@ -242,13 +242,6 @@ in
 
   nixpkgs = {
     config.allowUnfree = true;
-    overlays = [
-      (self: super: {
-        cgit-pink = super.cgit-pink.overrideAttrs (old: {
-          patches = [ ../patches/cgit-pink.patch ];
-        });
-      })
-    ];
   };
 
   programs.fish = {
diff --git a/system/nanopi.nix b/system/nanopi.nix
index 2d3551a4..3c4b4a0f 100755
--- a/system/nanopi.nix
+++ b/system/nanopi.nix
@@ -615,7 +615,6 @@ in
     };
   };
   nixpkgs.config.allowUnfree = true;
-  nixpkgs.overlays = [ ];
   system.autoUpgrade = {
     enable = false;
     dates = "01:00";
diff --git a/user/settings/development/web.nix b/user/settings/development/web.nix
index 1b1f53da..d7d0c2eb 100644
--- a/user/settings/development/web.nix
+++ b/user/settings/development/web.nix
@@ -10,7 +10,7 @@
     prettier
   ] ++ (with pkgs; [
     flyctl
-    self.htmlformat
+    htmlformat
   ]);
   home.shellAliases = {
     # 0.2.25 current completion command only affects `flyctl`, although `fly` is a link to `flyctl`
diff --git a/user/settings/nix.nix b/user/settings/nix.nix
index c24bb984..dd4ea824 100644
--- a/user/settings/nix.nix
+++ b/user/settings/nix.nix
@@ -27,9 +27,6 @@ in
     maintainers = [ "alanpearce" ];
     nixpkgs = "builtins.getFlake \"nixpkgs\"";
   };
-  nixpkgs.overlays = [
-    (import ../overlays/extra-packages.nix)
-  ];
   programs.emacs.extraPackages = epkgs: (with epkgs; [
     nix-mode
     nix-update
diff --git a/user/settings/nixpkgs.nix b/user/settings/nixpkgs.nix
index 9f8af5c8..992f6742 100644
--- a/user/settings/nixpkgs.nix
+++ b/user/settings/nixpkgs.nix
@@ -10,10 +10,4 @@ in
   imports = [
     ./nix.nix
   ];
-  nixpkgs.overlays = [
-    (self: super: {
-      firefox-bin-unwrapped = super.firefox-bin-unwrapped.override { systemLocale = "en-GB"; };
-      firefox-devedition-bin-unwrapped = super.firefox-devedition-bin-unwrapped.override { systemLocale = "en-GB"; };
-    })
-  ];
 }
diff --git a/user/settings/rofi.nix b/user/settings/rofi.nix
index c0c6990d..35d50a91 100644
--- a/user/settings/rofi.nix
+++ b/user/settings/rofi.nix
@@ -12,15 +12,6 @@
     gui_if_available = false
   '';
 
-  nixpkgs.overlays = [
-    (self: super: {
-      rofi = super.rofi.overrideAttrs (oldAttrs: rec {
-        postInstall = ''
-          ln $out/bin/rofi $out/bin/dmenu
-        '';
-      });
-    })
-  ];
   programs.rofi = {
     enable = true;
     theme = "Arc";