summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix122
1 files changed, 76 insertions, 46 deletions
diff --git a/flake.nix b/flake.nix
index 8409d0f..3ca0fbc 100644
--- a/flake.nix
+++ b/flake.nix
@@ -11,55 +11,85 @@
};
};
- outputs = { self, nixpkgs, nixpkgs-stable, home-manager, ... }:
- let
- system = "x86_64-linux";
- overlay = nixpkgs.lib.composeManyExtensions [
- (final: prev: {
- vimPlugins = prev.vimPlugins // {
- nvim-treesitter = prev.vimPlugins.nvim-treesitter.overrideAttrs (old: {
- version = "2022-10-28";
- src = builtins.fetchGit {
- url = "file:///home/mike/projects/nvim-treesitter";
- rev = "2c0ae6e8e81366ba088f1e5be62f467212cda52e";
- };
- passthru.withPlugins =
- grammarFn: final.vimPlugins.nvim-treesitter.overrideAttrs (_: {
- postPatch =
- let
- grammars = prev.tree-sitter.withPlugins grammarFn;
- in
- ''
- rm -r parser
- ln -s ${grammars} parser
- '';
- });
- });
- };
- })
- ];
+ outputs = {
+ self,
+ nixpkgs,
+ nixpkgs-stable,
+ home-manager,
+ ...
+ }: let
+ system = "x86_64-linux";
+ overlay = nixpkgs.lib.composeManyExtensions [
+ (final: prev: {
+ vimPlugins =
+ prev.vimPlugins
+ // {
+ nvim-treesitter = prev.vimPlugins.nvim-treesitter.overrideAttrs (old: {
+ version = "2022-10-28";
+ src = builtins.fetchGit {
+ url = "file:///home/mike/projects/nvim-treesitter";
+ rev = "2c0ae6e8e81366ba088f1e5be62f467212cda52e";
+ };
+ passthru.withPlugins = grammarFn:
+ final.vimPlugins.nvim-treesitter.overrideAttrs (_: {
+ postPatch = let
+ grammars = prev.tree-sitter.withPlugins grammarFn;
+ in ''
+ rm -r parser
+ ln -s ${grammars} parser
+ '';
+ });
+ });
+ };
+ })
- pkgs = import nixpkgs {
- overlays = [
- overlay
- ];
- inherit system;
- };
- in {
+ # fetchPluginFromGit = name: rev: pkgs.vimUtils.buildVimPluginFrom2Nix {
+ # name = name;
+ # src = builtins.fetchGit {
+ # url = "https://github.com/${name}";
+ # submodules = true;
+ # inherit rev;
+ # };
+ # };
+
+ # (fetchPluginFromGit "klen/nvim-test" "32f162c27045fc712664b9ddbd33d3c550cb2bfc")
+
+ (final: prev: {
+ vimPlugins =
+ prev.vimPlugins
+ // {
+ firvish-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
+ name = "firvish-nvim";
+ src = builtins.fetchGit {
+ url = "https://github.com/Furkanzmc/firvish.nvim";
+ submodules = true;
+ rev = "127f9146175d6bbaff6a8b761081cfd2279f8351";
+ };
+ };
+ };
+ })
+ ];
- homeConfigurations.mike = home-manager.lib.homeManagerConfiguration {
- pkgs = pkgs;
- # Specify your home configuration modules here, for example,
- # the path to your home.nix.
- modules = [
- ./home.nix
- ];
+ pkgs = import nixpkgs {
+ overlays = [
+ overlay
+ ];
+ inherit system;
+ };
+ in {
+ homeConfigurations.mike = home-manager.lib.homeManagerConfiguration {
+ inherit pkgs;
+ # Specify your home configuration modules here, for example,
+ # the path to your home.nix.
+ modules = [
+ ./home.nix
+ ];
- # Optionally use extraSpecialArgs
- # to pass through arguments to home.nix
- extraSpecialArgs = {
- flake = self;
- };
+ # Optionally use extraSpecialArgs
+ # to pass through arguments to home.nix
+ extraSpecialArgs = {
+ flake = self;
};
};
+ };
}