1 { config, pkgs, lib, ... }:
9 bashAndZshInitScript = ''
10 eval $(${pkgs.thefuck}/bin/thefuck --alias ${cfg.alias})
13 ${pkgs.thefuck}/bin/thefuck --alias ${cfg.alias} | source
19 enable = mkEnableOption (lib.mdDoc "thefuck");
25 description = lib.mdDoc ''
26 `thefuck` needs an alias to be configured.
27 The default value is `fuck`, but you can use anything else as well.
33 config = mkIf cfg.enable {
34 environment.systemPackages = with pkgs; [ thefuck ];
36 programs.bash.interactiveShellInit = bashAndZshInitScript;
37 programs.zsh.interactiveShellInit = mkIf prg.zsh.enable bashAndZshInitScript;
38 programs.fish.interactiveShellInit = mkIf prg.fish.enable fishInitScript;