From 78b28f5110feed1634bb22a6da4f0501a9101493 Mon Sep 17 00:00:00 2001 From: Grigory Shipunov Date: Mon, 17 Oct 2022 01:21:43 +0200 Subject: clean up fenix and add direnv --- modules/devtools.nix | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'modules/devtools.nix') diff --git a/modules/devtools.nix b/modules/devtools.nix index e3fe07b..02e2bc6 100644 --- a/modules/devtools.nix +++ b/modules/devtools.nix @@ -1,9 +1,5 @@ { pkgs, inputs, ... }: { - nixpkgs.overlays = [ - inputs.fenix.overlay - inputs.emacs-overlay.overlay - ]; environment.systemPackages = with pkgs; [ # general cmake @@ -11,16 +7,27 @@ binutils clang clang-tools + direnv + (nix-direnv.override { enableFlakes = true; }) # rust - (inputs.fenix.packages."x86_64-linux".stable.withComponents [ - "cargo" - "clippy" - "rust-src" - "rustc" - "rustfmt" - ]) - rust-analyzer-nightly + (inputs.fenix.packages."x86_64-linux".stable.toolchain) # nix rnix-lsp ]; + + ## direnv + programs.bash.interactiveShellInit = '' + eval "$(direnv hook bash)" + ''; + programs.zsh.interactiveShellInit = '' + eval "$(direnv hook zsh)" + ''; + # nix options for derivations to persist garbage collection + nix.extraOptions = '' + keep-outputs = true + keep-derivations = true + ''; + environment.pathsToLink = [ + "/share/nix-direnv" + ]; } -- cgit v1.3.1