refactor shell config
This commit is contained in:
parent
aa062722d5
commit
385bfedd8f
9 changed files with 139 additions and 78 deletions
35
home/modules/programs/fish.nix
Normal file
35
home/modules/programs/fish.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.youthlic.programs.fish;
|
||||
in {
|
||||
options = {
|
||||
youthlic.programs.fish = {
|
||||
enable = lib.mkEnableOption "fish";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
fish_vi_key_bindings
|
||||
'';
|
||||
functions = {
|
||||
__fish_command_not_found_handler = {
|
||||
body = "__fish_default_command_not_found_handler $argv[1]";
|
||||
onEvent = "fish_command_not_found";
|
||||
};
|
||||
fish_greeting = {
|
||||
body = ''
|
||||
fastfetch
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
fastfetch.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue