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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -13,14 +13,3 @@ set fzf_fd_opts --hidden --exclude=.git # fzf-fish search hidden f
|
|||
set -x DELTA_FEATURES +side-by-side # delta
|
||||
set -x GOPATH ~/.go # gopath
|
||||
set -x ANSIBLE_CONFIG ~/.ansible.cfg # Ansible path
|
||||
|
||||
# fzf layout & theme
|
||||
set -x FZF_DEFAULT_OPTS '
|
||||
--cycle
|
||||
--border=none
|
||||
--preview-window=wrap
|
||||
--color=fg:#000000,bg:#eeeeee,hl:#ca1243
|
||||
--color=fg+:#000000,bg+:#d0d0d0,hl+:#ca1243
|
||||
--color=info:#0184bc,prompt:#645199,pointer:#645199
|
||||
--color=marker:#0184bc,spinner:#645199,header:#645199
|
||||
--color=gutter:#eeeeee'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue