feat(nvim): use nixpkgs nvim and make overlay of dracula-nvim
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-01-23 09:06:09 -05:00
parent 1cfbf18866
commit cf728f5fa3
6 changed files with 74 additions and 229 deletions

View file

@ -2,16 +2,17 @@
config,
pkgs,
lib,
coc-stylelintplus-flake,
tree-sitter-hyprlang-flake,
nvim-theme-src,
coc-stylelintplus,
tree-sitter-hyprlang,
...
}: let
inherit (config.vars) neovimIde;
inherit (lib) fileContents optionalAttrs optionals;
javaSdk = pkgs.temurin-bin-17;
nvim-treesitter-hyprlang = tree-sitter-hyprlang-flake.packages.${pkgs.system}.default;
coc-stylelintplus = coc-stylelintplus-flake.packages.${pkgs.system}.default;
nvim-treesitter-hyprlang = tree-sitter-hyprlang.packages.${pkgs.system}.default;
coc-stylelintplus-flake = coc-stylelintplus.packages.${pkgs.system}.default;
in {
home = optionalAttrs neovimIde {
packages = with pkgs; [
@ -41,7 +42,6 @@ in {
neovim = {
enable = true;
package = pkgs.neovim-nightly;
withNodeJs = true;
withPython3 = true;
withRuby = false;
@ -157,7 +157,9 @@ in {
fugitive
{
plugin = dracula-nvim;
plugin = dracula-nvim.overrideAttrs {
src = nvim-theme-src;
};
type = "viml";
config = fileContents ./plugins/dracula.vim;
}
@ -194,7 +196,7 @@ in {
coc-eslint
coc-java
coc-sh
coc-stylelintplus
coc-stylelintplus-flake
{
plugin = coc-snippets;
type = "viml";

View file

@ -8,7 +8,7 @@
"https://cache.nixos.org"
"https://nixpkgs-wayland.cachix.org"
"https://nix-community.cachix.org"
# Neovim and stuff
# Nix-community
"https://nix-community.cachix.org"
# Nh
"https://viperml.cachix.org"
@ -23,7 +23,7 @@
# Nixpkgs-Wayland
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
# Neovim and stuff
# Nix-community
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
# Nh
"viperml.cachix.org-1:qZhKBMTfmcLL+OG6fj/hzsMEedgKvZVFRRAhq7j8Vh8="

View file

@ -20,16 +20,18 @@
'';
substituters = [
# Neovim and stuff
# Nix-community
"https://nix-community.cachix.org"
# FIXME: cache doesn't work
# Personal config cache
"https://cache.nelim.org"
# "https://cache.nelim.org"
];
trustedPublicKeys = [
# Neovim and stuff
# Nix-community
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
# Personal config cache
"cache.nelim.org:JmFqkUdH11EA9EZOFAGVHuRYp7EbsdJDHvTQzG2pPyY="
# "cache.nelim.org:JmFqkUdH11EA9EZOFAGVHuRYp7EbsdJDHvTQzG2pPyY="
];
};

View file

@ -1,5 +1,4 @@
{
neovim-flake,
nixpkgs-wayland,
...
} @ inputs: [
@ -8,6 +7,5 @@
(import ./spotifywm inputs)
(import ./squeekboard)
neovim-flake.overlay
nixpkgs-wayland.overlay
]

View file

@ -79,7 +79,7 @@
"type": "github"
}
},
"coc-stylelintplus-flake": {
"coc-stylelintplus": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
@ -117,22 +117,6 @@
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"locked": {
"lastModified": 1688025799,
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
@ -190,48 +174,6 @@
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"neovim-flake",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701473968,
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"neovim-flake",
"hercules-ci-effects",
"nixpkgs"
]
},
"locked": {
"lastModified": 1696343447,
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"flake-parts_5": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
@ -249,7 +191,7 @@
"type": "github"
}
},
"flake-parts_6": {
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs-wayland",
@ -311,24 +253,6 @@
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
@ -343,9 +267,9 @@
"type": "github"
}
},
"flake-utils_5": {
"flake-utils_4": {
"inputs": {
"systems": "systems_6"
"systems": "systems_5"
},
"locked": {
"lastModified": 1694529238,
@ -468,28 +392,6 @@
"type": "github"
}
},
"hercules-ci-effects_2": {
"inputs": {
"flake-parts": "flake-parts_4",
"nixpkgs": [
"neovim-flake",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701009247,
"narHash": "sha256-GuX16rzRze2y7CsewJLTV6qXkXWyEwp6VCZXi8HLruU=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "31b6cd7569191bfcd0a548575b0e2ef953ed7d09",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -497,11 +399,11 @@
]
},
"locked": {
"lastModified": 1705879479,
"narHash": "sha256-ZIohbyly1KOe+8I3gdyNKgVN/oifKdmeI0DzMfytbtg=",
"lastModified": 1706001011,
"narHash": "sha256-J7Bs9LHdZubgNHZ6+eE/7C18lZ1P6S5/zdJSdXFItI4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2d47379ad591bcb14ca95a90b6964b8305f6c913",
"rev": "3df2a80f3f85f91ea06e5e91071fa74ba92e5084",
"type": "github"
},
"original": {
@ -517,17 +419,16 @@
]
},
"locked": {
"lastModified": 1703648064,
"narHash": "sha256-c4bkc1HnLiFQrwBu5WTKLFY03f9D6Ia61aRmIGW55eU=",
"lastModified": 1706014834,
"narHash": "sha256-LjS70aH4NH0WRGTlzY94pJM6aQj84DBbKk+rg/X21JI=",
"owner": "horriblename",
"repo": "hyprgrass",
"rev": "0165a9ed8679f3f2c62cc868bdaf620e4520d504",
"rev": "1397ae8dad74474f5e967d53c26f981af0bb862d",
"type": "github"
},
"original": {
"owner": "horriblename",
"repo": "hyprgrass",
"rev": "0165a9ed8679f3f2c62cc868bdaf620e4520d504",
"type": "github"
}
},
@ -542,11 +443,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1705913207,
"narHash": "sha256-donM5hUaCylML0xwRZtH3SBSTBfdo7Ea3hJ+eiGZ/cI=",
"lastModified": 1705973554,
"narHash": "sha256-ZvzkhQA0iaUEkyCxBItps5qcSX509vpxpku1NVaiLRQ=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "02b4a9bdede8ab0336e2e7ac52b39cab36208bb4",
"rev": "791e1b96b3cd12d56648b3ce7ffb0832eba2b37d",
"type": "github"
},
"original": {
@ -604,7 +505,7 @@
},
"lib-aggregate": {
"inputs": {
"flake-utils": "flake-utils_4",
"flake-utils": "flake-utils_3",
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
@ -637,55 +538,6 @@
"type": "github"
}
},
"neovim-flake": {
"inputs": {
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_3",
"hercules-ci-effects": "hercules-ci-effects_2",
"neovim-flake": "neovim-flake_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1703462663,
"narHash": "sha256-YXdSFsf8JMBaf/RoGtghcbhX2FouAxSmBngT7j7uJtU=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "c4caeb6f9e87ea08baece83e6cac351d9bd3bb2f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "c4caeb6f9e87ea08baece83e6cac351d9bd3bb2f",
"type": "github"
}
},
"neovim-flake_2": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"neovim-flake",
"nixpkgs"
]
},
"locked": {
"dir": "contrib",
"lastModified": 1703447444,
"narHash": "sha256-H8ba6xLDE+lSRlfa2s5U4bF4gIDtdaozN9VT/nm//ps=",
"owner": "neovim",
"repo": "neovim",
"rev": "675522af18f59918a64e6dbe5f0ba3b1d3b4eb65",
"type": "github"
},
"original": {
"dir": "contrib",
"owner": "neovim",
"repo": "neovim",
"type": "github"
}
},
"nh": {
"inputs": {
"nixpkgs": "nixpkgs"
@ -706,7 +558,7 @@
},
"nix-eval-jobs": {
"inputs": {
"flake-parts": "flake-parts_6",
"flake-parts": "flake-parts_4",
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_5",
"treefmt-nix": "treefmt-nix"
@ -750,15 +602,15 @@
},
"nix-gaming": {
"inputs": {
"flake-parts": "flake-parts_5",
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1705886383,
"narHash": "sha256-AXP+WRbsyCYdT0AQNHEBvblMed64oV2siReHwK+BmRk=",
"lastModified": 1705972904,
"narHash": "sha256-tFTnkEf204Qd+EncVneGBZi/vqzU97Ody9JtWuOrYNE=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "620f74d52371e5fbbd8c6d6dae3b3b36de26d1f7",
"rev": "ec1ddf5032735e68b2bbde3cee9b536ea89c6fec",
"type": "github"
},
"original": {
@ -952,17 +804,17 @@
},
"nixpkgs-wayland": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat",
"lib-aggregate": "lib-aggregate",
"nix-eval-jobs": "nix-eval-jobs",
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1705926672,
"narHash": "sha256-z8N2y+PYLVHW9NSv2MJo/IlbX40wbZ/pNd5RNiVKsZ4=",
"lastModified": 1706005063,
"narHash": "sha256-qQKDesj49QU7NwSc6i4YvRaZeRzqUZIRnXOlDJiiizQ=",
"owner": "nix-community",
"repo": "nixpkgs-wayland",
"rev": "cf61ac5eb6f302581a6a4514565fa11cf1a3fea5",
"rev": "8b519118dba0ae420f56e3ed1f6826a142a052eb",
"type": "github"
},
"original": {
@ -1137,11 +989,11 @@
},
"nur": {
"locked": {
"lastModified": 1705927265,
"narHash": "sha256-eUUIBb3qYMrQB0ONGEj2kzKN8yzqwDmR4+Ct5/dvJcs=",
"lastModified": 1706014755,
"narHash": "sha256-RjiYDLlqM509x3NpuRgHjkT8nXq+P0v+VJzjm8RKqeE=",
"owner": "nix-community",
"repo": "NUR",
"rev": "a29c6f71063d0ce903e927fa7885651c00abd33b",
"rev": "8452fbba02b789b9046356a9546db1a312a04804",
"type": "github"
},
"original": {
@ -1168,6 +1020,22 @@
"type": "github"
}
},
"nvim-theme-src": {
"flake": false,
"locked": {
"lastModified": 1705994462,
"narHash": "sha256-yGV/bA7+Xi+LBi4Iz/SZDVl0KWoo+IO9kgfSIgTk0Ow=",
"owner": "Mofiqul",
"repo": "dracula.nvim",
"rev": "a6cb758d4b182d9f2b7e742910078d94877c1059",
"type": "github"
},
"original": {
"owner": "Mofiqul",
"repo": "dracula.nvim",
"type": "github"
}
},
"pam-fprint-grosshack-src": {
"flake": false,
"locked": {
@ -1272,7 +1140,7 @@
"arion": "arion",
"bat-theme-src": "bat-theme-src",
"caddy-plugins": "caddy-plugins",
"coc-stylelintplus-flake": "coc-stylelintplus-flake",
"coc-stylelintplus": "coc-stylelintplus",
"eisa-scripts-src": "eisa-scripts-src",
"git-theme-src": "git-theme-src",
"gpu-screen-recorder-src": "gpu-screen-recorder-src",
@ -1282,7 +1150,6 @@
"hyprgrass": "hyprgrass",
"hyprland": "hyprland",
"modernx-src": "modernx-src",
"neovim-flake": "neovim-flake",
"nh": "nh",
"nix-gaming": "nix-gaming",
"nix-index-db": "nix-index-db",
@ -1294,6 +1161,7 @@
"nms": "nms",
"nur": "nur",
"nurl": "nurl",
"nvim-theme-src": "nvim-theme-src",
"pam-fprint-grosshack-src": "pam-fprint-grosshack-src",
"persist-properties-src": "persist-properties-src",
"plymouth-src": "plymouth-src",
@ -1304,7 +1172,7 @@
"spotifywm-src": "spotifywm-src",
"touch-gestures-src": "touch-gestures-src",
"trash-d-src": "trash-d-src",
"tree-sitter-hyprlang-flake": "tree-sitter-hyprlang-flake",
"tree-sitter-hyprlang": "tree-sitter-hyprlang",
"xresources-theme-src": "xresources-theme-src"
}
},
@ -1442,21 +1310,6 @@
"type": "github"
}
},
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"touch-gestures-src": {
"flake": false,
"locked": {
@ -1489,9 +1342,9 @@
"type": "github"
}
},
"tree-sitter-hyprlang-flake": {
"tree-sitter-hyprlang": {
"inputs": {
"flake-utils": "flake-utils_5",
"flake-utils": "flake-utils_4",
"nixpkgs": [
"nixpkgs"
]

View file

@ -4,7 +4,6 @@
home-manager,
nixpkgs,
nix-on-droid,
neovim-flake,
secrets,
...
}: let
@ -192,15 +191,12 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# FIXME: https://github.com/horriblename/hyprgrass/issues/76
hyprgrass = {
type = "github";
owner = "horriblename";
repo = "hyprgrass";
# FIXME: https://github.com/horriblename/hyprgrass/issues/76
# Commit before PR #73 that breaks swiping
rev = "0165a9ed8679f3f2c62cc868bdaf620e4520d504";
inputs.hyprland.follows = "hyprland";
};
@ -212,20 +208,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# Neovim inputs
neovim-flake = {
type = "github";
owner = "nix-community";
repo = "neovim-nightly-overlay";
# FIXME: memory leak on latest neovim git
rev = "c4caeb6f9e87ea08baece83e6cac351d9bd3bb2f";
# to make sure plugins and nvim have same binaries
inputs.nixpkgs.follows = "nixpkgs";
};
coc-stylelintplus-flake = {
coc-stylelintplus = {
type = "github";
owner = "matt1432";
repo = "coc-stylelintplus";
@ -233,7 +216,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
tree-sitter-hyprlang-flake = {
tree-sitter-hyprlang = {
type = "github";
owner = "luckasRanarison";
repo = "tree-sitter-hyprlang";
@ -354,6 +337,13 @@
};
## Dracula src
nvim-theme-src = {
type = "github";
owner = "Mofiqul";
repo = "dracula.nvim";
flake = false;
};
bat-theme-src = {
type = "github";
owner = "matt1432";