thefuck: init at 3.18 (#26529)
This commit is contained in:
committed by
Jörg Thalheim
parent
9cad7076d1
commit
3803864ca6
@@ -0,0 +1,31 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.thefuck;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
programs.thefuck = {
|
||||
enable = mkEnableOption "thefuck";
|
||||
|
||||
alias = mkOption {
|
||||
default = "fuck";
|
||||
type = types.string;
|
||||
|
||||
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 ];
|
||||
environment.shellInit = ''
|
||||
eval $(${pkgs.thefuck}/bin/thefuck --alias ${cfg.alias})
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user