1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-23 10:19:48 +01:00

direnv.nix-direnv: remove enableFlakes (#2458)

Since https://github.com/NixOS/nixpkgs/pull/144197 flake support is
always available. The upstream `enableFlakes` option is scheduled to be
removed altogether in https://github.com/NixOS/nixpkgs/pull/145236
This commit is contained in:
Bernardo Meurer 2021-11-09 20:59:40 -08:00 committed by GitHub
parent 2917ef23b3
commit 1e5c8e9bff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,8 @@ 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 ];
@ -79,7 +81,6 @@ 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";
}; };
}; };
@ -92,11 +93,9 @@ 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 ${package}/share/nix-direnv/direnvrc"); "source ${pkgs.nix-direnv}/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 (