summaryrefslogtreecommitdiff
path: root/modules/devtools.nix
diff options
context:
space:
mode:
authorGrigory Shipunov2022-10-17 01:21:43 +0200
committerGrigory Shipunov2022-10-17 01:21:43 +0200
commit78b28f5110feed1634bb22a6da4f0501a9101493 (patch)
tree329ef46a1e613da59b23e1034f7891f6ccf74998 /modules/devtools.nix
parent966f65a2fe332cfd5dace2f1bebd545fd1ba12d3 (diff)
clean up fenix and add direnv
Diffstat (limited to 'modules/devtools.nix')
-rw-r--r--modules/devtools.nix31
1 files changed, 19 insertions, 12 deletions
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"
+ ];
}