refactor(flake): tidy up inputs attrset

This commit is contained in:
iofq 2025-03-15 01:34:46 -05:00
parent 7e87ede672
commit 4dfe6c4c33
9 changed files with 263 additions and 295 deletions

View file

@ -10,13 +10,17 @@
url = "github:mrcjkb/nix-gen-luarc-json";
inputs.nixpkgs.follows = "nixpkgs";
};
# Add bleeding-edge plugins here.
# They can be updated with `nix flake update` (make sure to commit the generated flake.lock)
# wf-nvim = {
# url = "github:Cassin01/wf.nvim";
# flake = false;
# };
};
outputs = inputs @ {
self,
nixpkgs,
flake-utils,
gen-luarc,
...
}: let
systems = builtins.attrNames nixpkgs.legacyPackages;
@ -27,10 +31,14 @@
flake-utils.lib.eachSystem systems (system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
inputs.neovim-nightly-overlay.overlays.default
gen-luarc.overlays.default
# inputs.neovim-nightly-overlay.overlays.default
neovim-overlay
# This adds a function can be used to generate a .luarc.json
# containing the Neovim API all plugins in the workspace directory.
# The generated file can be symlinked in the devShell's shellHook.
inputs.gen-luarc.overlays.default
];
};
shell = pkgs.mkShell {
@ -43,6 +51,7 @@
nvim-dev
];
shellHook = ''
# symlink the .luarc.json generated in the overlay
ln -fs ${pkgs.nvim-luarc-json} .luarc.json
# allow quick iteration of lua configs
ln -Tfns $PWD/nvim ~/.config/nvim-dev