Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d160d1b40817
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 12e8bea47760
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jul 30, 2017

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Ma27 Maximilian Bosch
    Copy the full SHA
    26655f5 View commit details
  2. Merge pull request #27578 from Ma27/bugfix/thefuck/support-for-non-po…

    …six-compliant-shells
    
    programs.thefuck: support shells that don't use `/etc/profile`
    Mic92 authored Jul 30, 2017

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    NeQuissimus Tim Steinbach
    Copy the full SHA
    12e8bea View commit details
Showing with 11 additions and 3 deletions.
  1. +11 −3 nixos/modules/programs/thefuck.nix
14 changes: 11 additions & 3 deletions nixos/modules/programs/thefuck.nix
Original file line number Diff line number Diff line change
@@ -3,7 +3,12 @@
with lib;

let
cfg = config.programs.thefuck;
prg = config.programs;
cfg = prg.thefuck;

initScript = ''
eval $(${pkgs.thefuck}/bin/thefuck --alias ${cfg.alias})
'';
in
{
options = {
@@ -24,8 +29,11 @@ in

config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ thefuck ];
environment.shellInit = ''
eval $(${pkgs.thefuck}/bin/thefuck --alias ${cfg.alias})
environment.shellInit = initScript;

programs.zsh.shellInit = mkIf prg.zsh.enable initScript;
programs.fish.shellInit = mkIf prg.fish.enable ''
${pkgs.thefuck}/bin/thefuck --alias | source
'';
};
}