From fbea5c38849d116df6f1a870f6f44cec05866989 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 23 Oct 2023 21:33:06 +0100 Subject: [PATCH] Fix adding tree-sitter grammars Add nix-index-database flake --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 15 ++++++++------- home/emacs/default.nix | 5 ++++- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/flake.lock b/flake.lock index 70bda20b..60df6eb5 100644 --- a/flake.lock +++ b/flake.lock @@ -470,6 +470,26 @@ "type": "github" } }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1697946153, + "narHash": "sha256-7k7qIwWLaYPgQ4fxmEdew3yCffhK6rM4I4Jo3X/79DA=", + "owner": "Mic92", + "repo": "nix-index-database", + "rev": "5a2006282caaf32663cdcd582c5b18809c7d7d8d", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "nix-index-database", + "type": "github" + } + }, "nixago": { "inputs": { "flake-utils": [ @@ -661,6 +681,7 @@ "anyrun": "anyrun", "crafted-emacs": "crafted-emacs", "home-manager": "home-manager", + "nix-index-database": "nix-index-database", "nixpkgs": "nixpkgs", "stylix": "stylix", "tokyonight-folke": "tokyonight-folke", diff --git a/flake.nix b/flake.nix index 1fa58072..84c21954 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,10 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-index-database = { + url = "github:Mic92/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; stylix = { url = "github:danth/stylix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -31,7 +35,8 @@ }; }; - outputs = { self, nixpkgs, home-manager, stylix, ... }@inputs: + outputs = + { self, nixpkgs, home-manager, nix-index-database, stylix, ... }@inputs: let default = { hostName = "Atlas"; @@ -76,6 +81,7 @@ ./hosts/${hostName}/configuration.nix ./hosts/${hostName}/hardware-configuration.nix home-manager.nixosModules.home-manager + nix-index-database.nixosModules.nix-index stylix.nixosModules.stylix ({ config, lib, pkgs, ... }: { boot.loader = { @@ -94,12 +100,7 @@ ''; }; command-not-found.enable = false; - nix-index = { - enable = true; - enableBashIntegration = true; - enableFishIntegration = true; - enableZshIntegration = true; - }; + nix-index.enable = true; }; nix = { enable = true; diff --git a/home/emacs/default.nix b/home/emacs/default.nix index 679e51ba..36ec54a7 100644 --- a/home/emacs/default.nix +++ b/home/emacs/default.nix @@ -1,7 +1,7 @@ { config, pkgs, crafted-emacs, ... }: { - imports = [ ./formatters.nix ./lsp_servers.nix ./tree-sitter.nix ]; + imports = [ ./formatters.nix ./lsp_servers.nix ]; stylix.targets.emacs.enable = false; xdg.configFile = { "emacs/init.el".source = ./init.el; @@ -40,6 +40,9 @@ aggressive-indent ibuffer-project + # tree-sitter grammars + treesit-grammars.with-all-grammars + # crafted-org-packages denote org-appear