Files
nvim/flake.nix

56 lines
1.4 KiB
Nix
Raw Normal View History

2023-04-02 13:26:27 +03:00
{
2025-10-23 19:50:10 +03:00
description = "Neovim configuration, declaratively written using nix";
2023-04-02 13:26:27 +03:00
inputs = {
2025-10-23 19:50:10 +03:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
nixvim.url = "github:nix-community/nixvim/nixos-25.05";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
2025-10-23 19:50:10 +03:00
flake-parts.url = "github:hercules-ci/flake-parts";
systems.url = "github:nix-systems/default";
};
2024-11-14 19:53:26 +02:00
outputs =
2025-10-23 19:50:10 +03:00
{
nixvim,
flake-parts,
2024-11-14 19:53:26 +02:00
...
2025-10-23 19:50:10 +03:00
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;
2024-03-24 18:25:13 +02:00
2025-10-23 19:50:10 +03:00
perSystem =
{
pkgs,
system,
...
}:
let
nixvimLib = nixvim.lib.${system};
nixvimPkgs = nixvim.legacyPackages.${system};
nixvimModule = {
inherit pkgs;
module = import ./config; # import the module directly
# You can use `extraSpecialArgs` to pass additional arguments to your module files
extraSpecialArgs = {
# inherit (inputs) foo;
};
};
nvim = nixvimPkgs.makeNixvimWithModule nixvimModule;
in
{
checks = {
# Run `nix flake check .` to verify that your config is not broken
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
};
2024-11-14 19:53:26 +02:00
2025-10-23 19:50:10 +03:00
packages = {
# Lets you run `nix run .` to start nixvim
default = nvim;
};
2024-11-14 19:53:26 +02:00
};
2025-10-23 19:50:10 +03:00
};
2023-04-02 13:26:27 +03:00
}