79 lines
2.2 KiB
Nix
79 lines
2.2 KiB
Nix
{
|
|
# https://github.com/redyf/Neve/blob/main/flake.nix
|
|
description = "my_nixvim flake, Neve mod (only flake.nix)";
|
|
|
|
inputs = {
|
|
# https://github.com/nix-community/nixvim/issues/1859
|
|
# use nixos-24.05 branch to get rid of "error: attribute 'cmp-ai' missing"
|
|
nixvim.url = "github:nix-community/nixvim/nixos-24.05";
|
|
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
# nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
|
|
flake-utils = {
|
|
url = "github:numtide/flake-utils";
|
|
inputs.systems.follows = "my_systems";
|
|
};
|
|
my_systems = {
|
|
url = "path:./default.nix";
|
|
flake = false;
|
|
};
|
|
|
|
# https://github.com/nvim-neorg/nixpkgs-neorg-overlay
|
|
# https://github.com/nix-community/nixvim/issues/1395
|
|
neorg-overlay.url = "github:nvim-neorg/nixpkgs-neorg-overlay";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
# , nixpkgs-stable
|
|
nixvim,
|
|
flake-utils,
|
|
neorg-overlay,
|
|
...
|
|
}@inputs:
|
|
let
|
|
config = import ./config; # import the module directly
|
|
in
|
|
flake-utils.lib.eachDefaultSystem (
|
|
system:
|
|
let
|
|
nixvimLib = nixvim.lib.${system};
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
nixpkgs.overlays = [ neorg-overlay.overlays.default ];
|
|
};
|
|
# pkgs-stable = import nixpkgs-stable {
|
|
# inherit system;
|
|
# nixpkgs.overlays = [ neorg-overlay.overlays.default ];
|
|
# };
|
|
nixvim' = nixvim.legacyPackages.${system};
|
|
nvim = nixvim'.makeNixvimWithModule {
|
|
inherit pkgs;
|
|
module = config;
|
|
# You can use `extraSpecialArgs` to pass additional arguments to your module files
|
|
extraSpecialArgs = {
|
|
inherit self;
|
|
# inherit pkgs-stable;
|
|
inherit pkgs;
|
|
};
|
|
};
|
|
in
|
|
{
|
|
checks = {
|
|
# Run `nix flake check .` to verify that your config is not broken
|
|
default = nixvimLib.check.mkTestDerivationFromNvim {
|
|
inherit nvim;
|
|
name = "my_nixvim";
|
|
};
|
|
};
|
|
|
|
packages = {
|
|
# Lets you run `nix run .` to start nixvim
|
|
default = nvim;
|
|
};
|
|
|
|
# formatter = pkgs.alejandra;
|
|
}
|
|
);
|
|
}
|