more nvim config
This commit is contained in:
parent
123fd7b129
commit
05b317d275
3 changed files with 67 additions and 29 deletions
|
@ -1,28 +1,41 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.programs.v.rust;
|
||||
in {
|
||||
options.programs.v.rust = { enable = mkEnableOption "rust"; };
|
||||
let
|
||||
cfg = config.programs.v.rust;
|
||||
in
|
||||
{
|
||||
options.programs.v.rust.enable = mkEnableOption "rust";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home = {
|
||||
packages = with pkgs; [ rustup cargo-nextest cargo-msrv cargo-dist cargo-cross];
|
||||
packages = with pkgs; [
|
||||
rustup
|
||||
cargo-binutils
|
||||
cargo-nextest
|
||||
cargo-msrv
|
||||
cargo-dist
|
||||
cargo-cross
|
||||
];
|
||||
|
||||
file = {
|
||||
".cargo/config.toml".text = ''
|
||||
[registries.crates-io]
|
||||
protocol = "sparse"
|
||||
file.".cargo/config.toml".text = ''
|
||||
[registries.crates-io]
|
||||
protocol = "sparse"
|
||||
|
||||
[build]
|
||||
rustc-wrapper = "${pkgs.sccache}/bin/sccache"
|
||||
[build]
|
||||
rustc-wrapper = "${pkgs.sccache}/bin/sccache"
|
||||
|
||||
[target.'cfg(not(target_arch = "mips"))']
|
||||
linker = "${pkgs.clang}/bin/clang"
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold}/bin/mold"]
|
||||
[target.'cfg(not(target_arch = "mips"))']
|
||||
linker = "${pkgs.clang}/bin/clang"
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold}/bin/mold"]
|
||||
|
||||
[profile.rust-analyzer]
|
||||
inherits = "dev"
|
||||
'';
|
||||
};
|
||||
[profile.rust-analyzer]
|
||||
inherits = "dev"
|
||||
'';
|
||||
|
||||
sessionPath = [ "$HOME/.cargo/bin" ];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue