mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
add(nix): nixified common
This commit is contained in:
parent
f97e3f8be8
commit
074e78751a
9 changed files with 168 additions and 93 deletions
72
nix/home/common/fish/default.nix
Normal file
72
nix/home/common/fish/default.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{pkgs, ...}: {
|
||||
programs = let
|
||||
inherit (builtins) readFile foldl' map listToAttrs concatMap;
|
||||
in {
|
||||
fish = {
|
||||
enable = true;
|
||||
shellInit = readFile ./shellInit.fish;
|
||||
interactiveShellInit = let
|
||||
readGlobalFishConfigs = ns:
|
||||
foldl' (l: r: l + "\n" + r) ""
|
||||
(
|
||||
map
|
||||
(n: readFile ../../../../.config/fish/conf.d/${n}.fish)
|
||||
ns
|
||||
);
|
||||
in
|
||||
readFile ./interactiveShellInit.fish
|
||||
+ readGlobalFishConfigs [
|
||||
"alias"
|
||||
"bind"
|
||||
"colorscheme"
|
||||
"locale"
|
||||
];
|
||||
functions = let
|
||||
makeFishFunctions = ns:
|
||||
listToAttrs
|
||||
(
|
||||
concatMap
|
||||
(n: [
|
||||
{
|
||||
name = n;
|
||||
value = {body = readFile ../../../../.config/fish/functions/${n}.fish;};
|
||||
}
|
||||
])
|
||||
ns
|
||||
);
|
||||
in
|
||||
makeFishFunctions [
|
||||
"clone_to_repos"
|
||||
"file_extension"
|
||||
"file_mantissa"
|
||||
"fish_command_not_found"
|
||||
"fish_greeting"
|
||||
"fish_remove_path"
|
||||
"install_fisher"
|
||||
"largest-objects-in-repo"
|
||||
"snakecase"
|
||||
"timestamp"
|
||||
"tmux_attach"
|
||||
"tmux_home"
|
||||
"tmux_last"
|
||||
"tmux_sessionizer"
|
||||
"update_dotfiles"
|
||||
];
|
||||
plugins = let
|
||||
makeFishPlugins = ns: (concatMap
|
||||
(n: [
|
||||
{
|
||||
name = n;
|
||||
src = pkgs.fishPlugins.${n};
|
||||
}
|
||||
])
|
||||
ns);
|
||||
in
|
||||
makeFishPlugins [
|
||||
"fzf-fish"
|
||||
"colored-man-pages"
|
||||
"sponge"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue