summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2022-10-30 14:38:35 +0100
committerMike Vink <mike1994vink@gmail.com>2022-10-30 14:38:35 +0100
commit879650c4a49330425e0aad1bb79969dc0e11399b (patch)
treefb121740d4f322c72958b29c124edc49131d2937 /flake.nix
parent18a37da86840c9e111172f5f24ceebe227ca56ed (diff)
update
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix44
1 files changed, 39 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix
index 0910a40..8409d0f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,23 +1,54 @@
{
description = "Home Manager configuration of Jane Doe";
- # Specify the source of Home Manager and Nixpkgs.
+ # Specify the source of Home Manager and Nixpkgs and vim plugins.
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+ nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-22.05";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
- outputs = { nixpkgs, home-manager, ... }:
+ outputs = { self, nixpkgs, nixpkgs-stable, home-manager, ... }:
let
system = "x86_64-linux";
- pkgs = nixpkgs.legacyPackages.${system};
+ 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 {
- homeConfigurations.mike = home-manager.lib.homeManagerConfiguration {
- inherit pkgs;
+ homeConfigurations.mike = home-manager.lib.homeManagerConfiguration {
+ pkgs = pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
@@ -26,6 +57,9 @@
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
+ extraSpecialArgs = {
+ flake = self;
+ };
};
};
}