38 lines
896 B
Nix
38 lines
896 B
Nix
{
|
|
description = "My neovim configuration";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
yants.url = "github:divnix/yants";
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
utils,
|
|
yants,
|
|
...
|
|
} @ inputs: let
|
|
inherit (builtins) readFile replaceStrings;
|
|
fu = utils.lib;
|
|
versionFile = replaceStrings ["\n"] [""] (readFile ./VERSION);
|
|
version =
|
|
if self.sourceInfo ? dirtyShortRev
|
|
then "${versionFile}-${self.sourceInfo.dirtyShortRev}"
|
|
else versionFile;
|
|
|
|
forSystem = system: let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
inherit (pkgs) nil;
|
|
in {
|
|
formatter = pkgs.alejandra;
|
|
devShells.default = import ./shell.nix {
|
|
inherit pkgs;
|
|
};
|
|
};
|
|
in
|
|
(fu.eachDefaultSystem forSystem)
|
|
// {lib = import ./lib {inherit version yants;};};
|
|
}
|