add nil to vim

This commit is contained in:
Cyryl Płotnicki 2022-10-01 13:37:46 +01:00
parent 6989da5705
commit 27bd5f8652
3 changed files with 80 additions and 5 deletions

View file

@ -58,6 +58,31 @@
"type": "github" "type": "github"
} }
}, },
"nil": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs-nixos-unstable"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1664360253,
"narHash": "sha256-QXXzd6SYgpuFGcr6D8gtALC2V23kPIT4IkSM0eU6MJI=",
"owner": "oxalica",
"repo": "nil",
"rev": "d2a22b8460279a001bf070bcd6da660bda9c8bd7",
"type": "github"
},
"original": {
"owner": "oxalica",
"ref": "main",
"repo": "nil",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1663229557, "lastModified": 1663229557,
@ -159,6 +184,7 @@
"darwin": "darwin", "darwin": "darwin",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"nil": "nil",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs-master": "nixpkgs-master", "nixpkgs-master": "nixpkgs-master",
"nixpkgs-nixos-unstable": "nixpkgs-nixos-unstable", "nixpkgs-nixos-unstable": "nixpkgs-nixos-unstable",
@ -167,6 +193,31 @@
"sops": "sops" "sops": "sops"
} }
}, },
"rust-overlay": {
"inputs": {
"flake-utils": [
"nil",
"flake-utils"
],
"nixpkgs": [
"nil",
"nixpkgs"
]
},
"locked": {
"lastModified": 1663815552,
"narHash": "sha256-J4j/d69SGKx1qripBCINe7T3SUtMM1sdj5PoHRThV5Q=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "f45f856ae5a9fe2c48d756fa17bb9c5b3b8070c5",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sops": { "sops": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [

View file

@ -1,7 +1,7 @@
{ {
description = "NixOS configuration with flakes"; description = "NixOS configuration with flakes";
outputs = { self, flake-utils, home-manager, nixpkgs-nixos-unstable outputs = { self, flake-utils, home-manager, nixpkgs-nixos-unstable
, nixpkgs-master, nixpkgs-stable, darwin, nixos-hardware, nur, sops, , nixpkgs-master, nixpkgs-stable, darwin, nixos-hardware, nur, sops, nil
}@inputs: }@inputs:
let let
@ -66,6 +66,7 @@
imports = imports =
[ ./nixos/home-manager ./nixos/home-manager/linux.nix ]; [ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
_module.args.inputs = inputs; _module.args.inputs = inputs;
_module.args.system = system;
}; };
} }
@ -262,6 +263,15 @@
ref = "master"; ref = "master";
}; };
nil = {
type = "github";
owner = "oxalica";
repo = "nil";
ref = "main";
inputs.nixpkgs.follows = "nixpkgs-nixos-unstable";
inputs.flake-utils.follows = "flake-utils";
};
sops = { sops = {
type = "github"; type = "github";
owner = "Mic92"; owner = "Mic92";

View file

@ -1,4 +1,6 @@
{ config, pkgs, lib, inputs, ... }: { { config, pkgs, lib, inputs, system, ... }:
let nil = inputs.nil.packages."${system}".default;
in {
home.file.".vimrc".source = ../../../.vimrc; home.file.".vimrc".source = ../../../.vimrc;
home.packages = with pkgs; [ ripgrep ]; home.packages = with pkgs; [ ripgrep ];
programs.neovim = { programs.neovim = {
@ -7,15 +9,27 @@
enable = true; enable = true;
package = pkgs.vimUtils.buildVimPluginFrom2Nix { package = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "coc.nvim"; pname = "coc.nvim";
version = "2022-05-21"; version = "v0.0.82";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "neoclide"; owner = "neoclide";
repo = "coc.nvim"; repo = "coc.nvim";
rev = "791c9f673b882768486450e73d8bda10e391401d"; rev = "v0.0.82";
sha256 = "sha256-MobgwhFQ1Ld7pFknsurSFAsN5v+vGbEFojTAYD/kI9c="; sha256 = "sha256-TIkx/Sp9jnRd+3jokab91S5Mb3JV8yyz3wy7+UAd0A0=";
}; };
meta.homepage = "https://github.com/neoclide/coc.nvim/"; meta.homepage = "https://github.com/neoclide/coc.nvim/";
}; };
settings = ''
{
"languageserver": {
"nix": {
"command": "${nil}/bin/nil",
"filetypes": ["nix"],
"rootPatterns": ["flake.nix"]
}
}
}
'';
}; };
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;