Bash : Move config to nix.

This commit is contained in:
Dmitry Voronin 2024-02-24 23:39:22 +03:00
parent dd2fdd984c
commit 912b96ddf4
60 changed files with 29 additions and 44 deletions

View file

@ -1,8 +0,0 @@
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs

View file

@ -1,5 +0,0 @@
# Add all links in ~/app/bin/
export PATH=$( find -L ${HOME}/app/bin/ -type d -printf ":%p" 2> /dev/null ):${PATH}
# Bash modules.
export BASH_MODULE_PATH="${HOME}/.config/bash/module"

View file

@ -16,6 +16,7 @@
# Common modules used across all hosts.
nixosModules.common.imports = [
./module/common/Bash.nix
./module/common/Bootloader.nix
./module/common/Distrobox.nix
./module/common/Dotfiles.nix

View file

@ -0,0 +1,5 @@
{ environment, ... }: {
environment.etc.bash.source = ./bash;
environment.variables.BASH_MODULE_PATH = "/etc/bash/module/";
programs.bash.interactiveShellInit = ''source /etc/bash/Bashrc.sh'';
}

View file

@ -9,28 +9,6 @@ in {
vimAlias = true;
configure = {
customRC = ''
lua dofile("${nvimSrc}/plugin/Init.lua")
lua dofile("${nvimSrc}/plugin/Filetree.lua")
lua dofile("${nvimSrc}/plugin/lsp/Rust.lua")
lua dofile("${nvimSrc}/plugin/lsp/Tex.lua")
lua dofile("${nvimSrc}/plugin/Bufferline.lua")
lua dofile("${nvimSrc}/plugin/Lualine.lua")
lua dofile("${nvimSrc}/plugin/Autoclose.lua")
lua dofile("${nvimSrc}/plugin/Gitsigns.lua")
lua dofile("${nvimSrc}/plugin/Trouble.lua")
lua dofile("${nvimSrc}/plugin/Tokyonight.lua")
lua dofile("${nvimSrc}/plugin/Gruvbox.lua")
lua dofile("${nvimSrc}/plugin/Closebuffers.lua")
lua dofile("${nvimSrc}/plugin/Telescope.lua")
lua dofile("${nvimSrc}/plugin/Todo.lua")
lua dofile("${nvimSrc}/plugin/Indent.lua")
lua dofile("${nvimSrc}/plugin/Align.lua")
lua dofile("${nvimSrc}/plugin/Treesitter.lua")
lua dofile("${nvimSrc}/plugin/Fold.lua")
lua dofile("${nvimSrc}/config/Autoread.lua")
lua dofile("${nvimSrc}/config/Etc.lua")
lua dofile("${nvimSrc}/config/Search.lua")
lua dofile("${nvimSrc}/config/Tab.lua")
lua dofile("${nvimSrc}/key/Rekey.lua")
lua dofile("${nvimSrc}/key/Leader.lua")
lua dofile("${nvimSrc}/key/Autocomplete.lua")
@ -49,6 +27,28 @@ in {
lua dofile("${nvimSrc}/key/Trouble.lua")
lua dofile("${nvimSrc}/key/Update.lua")
lua dofile("${nvimSrc}/key/Whichkey.lua")
lua dofile("${nvimSrc}/config/Autoread.lua")
lua dofile("${nvimSrc}/config/Etc.lua")
lua dofile("${nvimSrc}/config/Search.lua")
lua dofile("${nvimSrc}/config/Tab.lua")
lua dofile("${nvimSrc}/plugin/Init.lua")
lua dofile("${nvimSrc}/plugin/Filetree.lua")
lua dofile("${nvimSrc}/plugin/lsp/Rust.lua")
lua dofile("${nvimSrc}/plugin/lsp/Tex.lua")
lua dofile("${nvimSrc}/plugin/Bufferline.lua")
lua dofile("${nvimSrc}/plugin/Lualine.lua")
lua dofile("${nvimSrc}/plugin/Autoclose.lua")
lua dofile("${nvimSrc}/plugin/Gitsigns.lua")
lua dofile("${nvimSrc}/plugin/Trouble.lua")
lua dofile("${nvimSrc}/plugin/Tokyonight.lua")
lua dofile("${nvimSrc}/plugin/Gruvbox.lua")
lua dofile("${nvimSrc}/plugin/Closebuffers.lua")
lua dofile("${nvimSrc}/plugin/Telescope.lua")
lua dofile("${nvimSrc}/plugin/Todo.lua")
lua dofile("${nvimSrc}/plugin/Indent.lua")
lua dofile("${nvimSrc}/plugin/Align.lua")
lua dofile("${nvimSrc}/plugin/Treesitter.lua")
lua dofile("${nvimSrc}/plugin/Fold.lua")
'';
};
};

View file

@ -5,7 +5,7 @@
[[ -f /etc/bashrc ]] && source /etc/bashrc
# Src custom modules.
for module in ${HOME}/.config/bash/module/*.sh; do
for module in ${BASH_MODULE_PATH}/*.sh; do
source "${module}"
done

8
.gitignore vendored
View file

@ -42,10 +42,6 @@
/tmp/*
!/tmp/.dir
# Bash.
!/.bash_profile
!/.bashrc
# Bin.
!/app/bin/
!/app/bin/**
@ -62,10 +58,6 @@
!/.config/linux/
!/.config/linux/**
# Bash config.
!/.config/bash/
!/.config/bash/**
# MangoHud config.
!/.config/MangoHud/
!/.config/MangoHud/**