Skip to content

Commit

Permalink
refactor(neovim): reduce redundant codes
Browse files Browse the repository at this point in the history
  • Loading branch information
s3igo committed Sep 7, 2024
1 parent 6d3fba4 commit 87e3cf9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 4 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@
neovim-config = (import ./neovim-config/flake.nix).outputs { };
pkgs = import nixpkgs { inherit system; };
tasks = import ./tasks.nix { inherit system pkgs nix-darwin; };
packages = import ./packages.nix { inherit system nixvim neovim-config; };
inherit (nixvim.legacyPackages.${system}) makeNixvim;
packages = import ./packages.nix { inherit makeNixvim neovim-config; };
in
{
packages = packages // {
default = nixvim.legacyPackages.${system}.makeNixvim neovim-config.nixosModules.default;
neovim = nixvim.legacyPackages.${system}.makeNixvim {
default = makeNixvim neovim-config.nixosModules.default;
neovim = makeNixvim {
imports = with neovim-config.nixosModules; [
default
nix
Expand Down
5 changes: 2 additions & 3 deletions packages.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
system,
nixvim,
makeNixvim,
neovim-config,
}:

let
toPackage = name: {
inherit name;
value = nixvim.legacyPackages.${system}.makeNixvim {
value = makeNixvim {
imports = with neovim-config; [
nixosModules.default
nixosModules.${name}
Expand Down

0 comments on commit 87e3cf9

Please sign in to comment.