flake: simplify
This commit is contained in:
parent
39bb7b9e08
commit
49c8a13409
1 changed files with 25 additions and 29 deletions
54
flake.nix
54
flake.nix
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
description = "Guanran928's nvim config";
|
description = "Guanran928's Neovim configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
@ -7,33 +7,29 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs:
|
outputs = inputs:
|
||||||
inputs.flake-utils.lib.eachDefaultSystem (
|
inputs.flake-utils.lib.eachDefaultSystem (system: let
|
||||||
system: let
|
inherit (inputs.nixpkgs) lib;
|
||||||
inherit (inputs.nixpkgs) lib;
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
runtimeDeps = with pkgs; [
|
||||||
runtimeDeps = with pkgs; [
|
# mason / tree-sitter
|
||||||
# mason / tree-sitter
|
gcc
|
||||||
gcc
|
cargo
|
||||||
cargo
|
];
|
||||||
];
|
in {
|
||||||
in {
|
packages.default =
|
||||||
packages.default =
|
pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped
|
||||||
pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped
|
(pkgs.neovimUtils.makeNeovimConfig {
|
||||||
(pkgs.neovimUtils.makeNeovimConfig {
|
customRC = ''
|
||||||
customRC = ''
|
set runtimepath^=${./.}
|
||||||
set runtimepath^=${./.}
|
source ${./.}/init.lua
|
||||||
source ${./.}/init.lua
|
'';
|
||||||
'';
|
}
|
||||||
}
|
// {wrapperArgs = ["--prefix" "PATH" ":" "${lib.makeBinPath runtimeDeps}"];});
|
||||||
// {
|
|
||||||
wrapperArgs = ["--prefix" "PATH" ":" "${lib.makeBinPath runtimeDeps}"];
|
|
||||||
});
|
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
stylua
|
stylua
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue