mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 15:09:46 +01:00
Revert "direnv.nix-direnv: remove enableFlakes (#2458)"
This reverts commit 1e5c8e9bff
.
This commit is contained in:
parent
4daff26495
commit
3e93c4e8b2
1 changed files with 4 additions and 3 deletions
|
@ -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 {
|
|||
<link
|
||||
xlink:href="https://github.com/nix-community/nix-direnv">nix-direnv</link>,
|
||||
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 (
|
||||
|
|
Loading…
Reference in a new issue