Skip to content

Commit

Permalink
direnv.nix-direnv: remove enableFlakes (nix-community#2458)
Browse files Browse the repository at this point in the history
Since NixOS/nixpkgs#144197 flake support is
always available. The upstream `enableFlakes` option is scheduled to be
removed altogether in NixOS/nixpkgs#145236
  • Loading branch information
lovesegfault authored and peterhoeg committed Nov 29, 2021
1 parent 6ac7846 commit 0a0d64a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/programs/direnv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ in {
"direnv"
"enableNixDirenvIntegration"
] [ "programs" "direnv" "nix-direnv" "enable" ])
(mkRemovedOptionModule [ "programs" "direnv" "nix-direnv" "enableFlakes" ]
"Flake support is now always enabled.")
];

meta.maintainers = [ maintainers.rycee ];
Expand Down Expand Up @@ -79,7 +81,6 @@ 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";
};

};
Expand All @@ -92,11 +93,9 @@ 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 ${package}/share/nix-direnv/direnvrc");
"source ${pkgs.nix-direnv}/share/nix-direnv/direnvrc");
in mkIf (text != "") { inherit text; };

programs.bash.initExtra = mkIf cfg.enableBashIntegration (
Expand Down

0 comments on commit 0a0d64a

Please sign in to comment.