From 3e93c4e8b2b479c712b7c20a428993b459118842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 30 Nov 2021 11:10:06 +0100 Subject: [PATCH] Revert "direnv.nix-direnv: remove enableFlakes (#2458)" This reverts commit 1e5c8e9bff00d0844bc3d25d1a98eab5633e600b. --- modules/programs/direnv.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/programs/direnv.nix b/modules/programs/direnv.nix index ad4c4993..9974a28f 100644 --- a/modules/programs/direnv.nix +++ b/modules/programs/direnv.nix @@ -15,8 +15,6 @@ in { "direnv" "enableNixDirenvIntegration" ] [ "programs" "direnv" "nix-direnv" "enable" ]) - (mkRemovedOptionModule [ "programs" "direnv" "nix-direnv" "enableFlakes" ] - "Flake support is now always enabled.") ]; meta.maintainers = [ maintainers.rycee ]; @@ -81,6 +79,7 @@ in { nix-direnv, a fast, persistent use_nix implementation for direnv''; + enableFlakes = mkEnableOption "Flake support in nix-direnv"; }; }; @@ -93,9 +92,11 @@ in { }; xdg.configFile."direnv/direnvrc" = let + package = + pkgs.nix-direnv.override { inherit (cfg.nix-direnv) enableFlakes; }; text = concatStringsSep "\n" (optional (cfg.stdlib != "") cfg.stdlib ++ optional cfg.nix-direnv.enable - "source ${pkgs.nix-direnv}/share/nix-direnv/direnvrc"); + "source ${package}/share/nix-direnv/direnvrc"); in mkIf (text != "") { inherit text; }; programs.bash.initExtra = mkIf cfg.enableBashIntegration (