nix-community.nixvim/flake.nix

52 lines
1.4 KiB
Nix
Raw Normal View History

2020-12-30 01:05:51 +00:00
{
description = "A neovim configuration system for NixOS";
inputs.flake-utils.url = "github:numtide/flake-utils";
2020-12-30 01:05:51 +00:00
2022-11-15 11:36:42 +00:00
inputs.beautysh.url = "github:lovesegfault/beautysh";
inputs.beautysh.inputs.nixpkgs.follows = "nixpkgs";
2022-12-29 17:34:47 +00:00
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
with nixpkgs.lib;
with builtins;
let
# TODO: Support nesting
nixvimModules = map (f: ./modules + "/${f}") (attrNames (builtins.readDir ./modules));
modules = pkgs: nixvimModules ++ [
(rec {
_file = ./flake.nix;
key = _file;
config = {
_module.args = {
pkgs = mkForce pkgs;
inherit (pkgs) lib;
helpers = import ./plugins/helpers.nix { inherit (pkgs) lib; };
2022-11-15 11:36:42 +00:00
inputs = inputs;
2021-01-05 11:26:49 +00:00
};
};
})
2021-01-07 16:06:39 +00:00
2022-12-29 17:34:47 +00:00
# ./plugins/default.nix
];
2021-02-01 15:54:53 +00:00
flakeOutput =
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs { inherit system; };
in
{
2022-12-29 17:34:47 +00:00
packages.docs = pkgs.callPackage (import ./docs.nix) {
modules = nixvimModules;
};
2021-02-01 16:40:07 +00:00
legacyPackages.makeNixvim = import ./wrappers/standalone.nix pkgs (modules pkgs);
});
in
flakeOutput // {
nixosModules.nixvim = import ./wrappers/nixos.nix modules;
homeManagerModules.nixvim = import ./wrappers/hm.nix modules;
2020-12-30 01:05:51 +00:00
};
}