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"
|
"direnv"
|
||||||
"enableNixDirenvIntegration"
|
"enableNixDirenvIntegration"
|
||||||
] [ "programs" "direnv" "nix-direnv" "enable" ])
|
] [ "programs" "direnv" "nix-direnv" "enable" ])
|
||||||
(mkRemovedOptionModule [ "programs" "direnv" "nix-direnv" "enableFlakes" ]
|
|
||||||
"Flake support is now always enabled.")
|
|
||||||
];
|
];
|
||||||
|
|
||||||
meta.maintainers = [ maintainers.rycee ];
|
meta.maintainers = [ maintainers.rycee ];
|
||||||
|
@ -81,6 +79,7 @@ in {
|
||||||
<link
|
<link
|
||||||
xlink:href="https://github.com/nix-community/nix-direnv">nix-direnv</link>,
|
xlink:href="https://github.com/nix-community/nix-direnv">nix-direnv</link>,
|
||||||
a fast, persistent use_nix implementation for 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
|
xdg.configFile."direnv/direnvrc" = let
|
||||||
|
package =
|
||||||
|
pkgs.nix-direnv.override { inherit (cfg.nix-direnv) enableFlakes; };
|
||||||
text = concatStringsSep "\n" (optional (cfg.stdlib != "") cfg.stdlib
|
text = concatStringsSep "\n" (optional (cfg.stdlib != "") cfg.stdlib
|
||||||
++ optional cfg.nix-direnv.enable
|
++ optional cfg.nix-direnv.enable
|
||||||
"source ${pkgs.nix-direnv}/share/nix-direnv/direnvrc");
|
"source ${package}/share/nix-direnv/direnvrc");
|
||||||
in mkIf (text != "") { inherit text; };
|
in mkIf (text != "") { inherit text; };
|
||||||
|
|
||||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration (
|
programs.bash.initExtra = mkIf cfg.enableBashIntegration (
|
||||||
|
|
Loading…
Reference in a new issue