uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
40
nixos/modules/programs/thefuck.nix
Normal file
40
nixos/modules/programs/thefuck.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
prg = config.programs;
|
||||
cfg = prg.thefuck;
|
||||
|
||||
bashAndZshInitScript = ''
|
||||
eval $(${pkgs.thefuck}/bin/thefuck --alias ${cfg.alias})
|
||||
'';
|
||||
fishInitScript = ''
|
||||
${pkgs.thefuck}/bin/thefuck --alias ${cfg.alias} | source
|
||||
'';
|
||||
in
|
||||
{
|
||||
options = {
|
||||
programs.thefuck = {
|
||||
enable = mkEnableOption "thefuck";
|
||||
|
||||
alias = mkOption {
|
||||
default = "fuck";
|
||||
type = types.str;
|
||||
|
||||
description = ''
|
||||
`thefuck` needs an alias to be configured.
|
||||
The default value is `fuck`, but you can use anything else as well.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ thefuck ];
|
||||
|
||||
programs.bash.interactiveShellInit = bashAndZshInitScript;
|
||||
programs.zsh.interactiveShellInit = mkIf prg.zsh.enable bashAndZshInitScript;
|
||||
programs.fish.interactiveShellInit = mkIf prg.fish.enable fishInitScript;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue