nixos/thefuck: don't run thefuck on `environment.shellInit'

The init script slightly differs depending on which shell is in use.
So for bash it should be in the interactiveShellInit as well.

In this case we don't need a mkIf as `bash` is enabled by default
on NixOS.
This commit is contained in:
Maximilian Bosch 2018-10-03 02:11:17 +02:00
parent 358a1c8a28
commit bccd0faee4
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E

View File

@ -29,8 +29,8 @@ in
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ thefuck ];
environment.shellInit = initScript;
programs.bash.interactiveShellInit = initScript;
programs.zsh.interactiveShellInit = mkIf prg.zsh.enable initScript;
programs.fish.interactiveShellInit = mkIf prg.fish.enable ''
${pkgs.thefuck}/bin/thefuck --alias | source