Simplifies the git_ family of functions to make fish_right_prompt more readable. git_prompt function is added, which prints the relevant git prompt information. The git_ family of functions is moved into the git_prompt function, and fish_right_prompt calls git_prompt Going forward I'm trying to have modules in charge of the data for other modules, so I moved the nnn alias call from fish to n, and added a handy "extraFunctions" config option to fish. Maintaining the fish module's control of the functions, but allowing others to add stuff in
20 lines
499 B
Nix
20 lines
499 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
options.nnn = {
|
|
enable = lib.mkEnableOption "Enables nnn";
|
|
};
|
|
|
|
config = lib.mkIf config.nnn.enable {
|
|
programs.nnn.enable = true;
|
|
home.sessionVariables = {
|
|
NNN_FCOLORS = "0000E6310000000000000000";
|
|
NNN_OPTS = "eH";
|
|
NNN_FIFO = "/tmp/nnn.fifo";
|
|
NNN_TRASH = lib.mkIf config.trash.enable "1";
|
|
};
|
|
fish.extraFunctions = lib.mkIf config.fish.enable {
|
|
n = ''${builtins.readFile ./nnn_fish_function.fish}'';
|
|
};
|
|
};
|
|
}
|