From a648517bd9ed83c5469ef2de77c8bfa7983867e7 Mon Sep 17 00:00:00 2001 From: kiana-S Date: Sat, 13 Jan 2024 13:56:07 -0500 Subject: [PATCH] Switch to standard direnv module --- config/packages.nix | 14 ++++---------- home-manager/shell/default.nix | 6 +----- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/config/packages.nix b/config/packages.nix index 054dbcd..e8fa194 100644 --- a/config/packages.nix +++ b/config/packages.nix @@ -1,8 +1,5 @@ -{ config, pkgs, nixpkgs, ... }: +{ config, pkgs, ... }: let - # nix-direnv with flake support - nix-direnv-with-flakes = pkgs.nix-direnv.override { enableFlakes = true; }; - emacs29 = pkgs.emacs29.override { withPgtk = true; withWebP = true; @@ -30,9 +27,6 @@ in { (aspellWithDicts (ps: with ps; [ en en-computers en-science ])) gcc - - direnv - nix-direnv-with-flakes ]; programs.fish.enable = true; @@ -46,12 +40,12 @@ in { services.emacs.enable = true; services.emacs.package = emacs29; - # direnv setup + programs.direnv.enable = true; + programs.direnv.nix-direnv.enable = true; + programs.direnv.silent = true; nix.extraOptions = '' keep-derivations = true keep-outputs = true ''; - - environment.pathsToLink = [ "/share/nix-direnv" ]; } diff --git a/home-manager/shell/default.nix b/home-manager/shell/default.nix index 916df38..41a4d9b 100644 --- a/home-manager/shell/default.nix +++ b/home-manager/shell/default.nix @@ -7,15 +7,11 @@ programs.fish.enable = true; - # Hook nix-direnv to shell + # rlwrap config programs.fish.shellInit = '' - set -xg DIRENV_LOG_FORMAT "" - direnv hook fish | source - set -xg RLWRAP_HOME $XDG_DATA_HOME/rlwrap ''; home.packages = [ pkgs.rlwrap ]; - }