summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-06-30 17:00:05 +0200
committerAlan Pearce2023-06-30 17:00:05 +0200
commit2c733fb4b58f1940399c528d44ccc170e77e848c (patch)
treef048b40ae35b73f9480307bf06d05f26081ea955
parentf14c2285e9a0213aa0beed894bfb94c837ced31f (diff)
downloadnixfiles-2c733fb4b58f1940399c528d44ccc170e77e848c.tar.lz
nixfiles-2c733fb4b58f1940399c528d44ccc170e77e848c.tar.zst
nixfiles-2c733fb4b58f1940399c528d44ccc170e77e848c.zip
Add nix-index-database flake
-rw-r--r--flake.lock21
-rw-r--r--flake.nix7
-rw-r--r--user/settings/base.nix2
3 files changed, 29 insertions, 1 deletions
diff --git a/flake.lock b/flake.lock
index 6ea4e7df..d53c3b1a 100644
--- a/flake.lock
+++ b/flake.lock
@@ -81,6 +81,26 @@
         "type": "github"
       }
     },
+    "nix-index-database": {
+      "inputs": {
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1687097842,
+        "narHash": "sha256-NPAaRZx5foWLgIPfEaiEZMr9JIlEQhLEVEXpx09341Q=",
+        "owner": "Mic92",
+        "repo": "nix-index-database",
+        "rev": "c8210cb3fcde6860255b54ddba74dc177e6232cd",
+        "type": "github"
+      },
+      "original": {
+        "owner": "Mic92",
+        "repo": "nix-index-database",
+        "type": "github"
+      }
+    },
     "nixos-hardware": {
       "locked": {
         "lastModified": 1686452266,
@@ -133,6 +153,7 @@
         "darwin": "darwin",
         "emacs-overlay": "emacs-overlay",
         "home-manager": "home-manager",
+        "nix-index-database": "nix-index-database",
         "nixos-hardware": "nixos-hardware",
         "nixpkgs": "nixpkgs",
         "secrets": "secrets"
diff --git a/flake.nix b/flake.nix
index 6329ef61..8e519a36 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,6 +2,8 @@
   inputs = {
     nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
     nixos-hardware.url = "github:NixOS/nixos-hardware";
+    nix-index-database.url = "github:Mic92/nix-index-database";
+    nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
     darwin.url = "github:lnl7/nix-darwin/master";
     darwin.inputs.nixpkgs.follows = "nixpkgs";
     home-manager.url = "github:nix-community/home-manager";
@@ -19,6 +21,7 @@
     , emacs-overlay
     , home-manager
     , nixpkgs
+    , nix-index-database
     , secrets
     , ...
     } @ attrs:
@@ -46,6 +49,7 @@
         extraSpecialArgs = { inherit attrs; };
         modules = [
           ./user/mba.nix
+          nix-index-database.hmModules.nix-index
           (secrets + "/default.nix")
           (secrets + "/ssh.nix")
           ({ nixpkgs.overlays = [ emacs-overlay.overlay ]; })
@@ -56,6 +60,7 @@
         extraSpecialArgs = { inherit attrs; };
         modules = [
           ./user/prefect.nix
+          nix-index-database.hmModules.nix-index
           (secrets + "/default.nix")
           (secrets + "/ssh.nix")
           ({ nixpkgs.overlays = [ emacs-overlay.overlay ]; })
@@ -66,6 +71,7 @@
         extraSpecialArgs = { inherit attrs; };
         modules = [
           ./user/nanopi.nix
+          nix-index-database.hmModules.nix-index
           (secrets + "/default.nix")
         ];
       };
@@ -74,6 +80,7 @@
         extraSpecialArgs = { inherit attrs; };
         modules = [
           ./user/server.nix
+          nix-index-database.hmModules.nix-index
           (secrets + "/default.nix")
         ];
       };
diff --git a/user/settings/base.nix b/user/settings/base.nix
index ba638388..5aedc774 100644
--- a/user/settings/base.nix
+++ b/user/settings/base.nix
@@ -51,13 +51,13 @@
       theme = "gruvbox-light";
     };
   };
+  programs.nix-index-database.comma.enable = true;
   home.packages = with pkgs;
     [
       pv
       fd
       sd
       ripgrep
-      comma
       knot-dns
       dateutils
       moreutils