diff --git a/.bash_profile b/.bash_profile deleted file mode 100644 index 55136b9..0000000 --- a/.bash_profile +++ /dev/null @@ -1,8 +0,0 @@ -# .bash_profile - -# Get the aliases and functions -if [ -f ~/.bashrc ]; then - . ~/.bashrc -fi - -# User specific environment and startup programs diff --git a/.config/bash/module/Export.sh b/.config/bash/module/Export.sh deleted file mode 100644 index 2f8842c..0000000 --- a/.config/bash/module/Export.sh +++ /dev/null @@ -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" diff --git a/.config/linux/system/flake.nix b/.config/linux/system/flake.nix index 14ddf88..be351f6 100644 --- a/.config/linux/system/flake.nix +++ b/.config/linux/system/flake.nix @@ -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 diff --git a/.config/linux/system/module/common/Bash.nix b/.config/linux/system/module/common/Bash.nix new file mode 100644 index 0000000..92a64ab --- /dev/null +++ b/.config/linux/system/module/common/Bash.nix @@ -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''; +} diff --git a/.config/linux/system/module/common/Nvim.nix b/.config/linux/system/module/common/Nvim.nix index 472ccd0..c95666b 100644 --- a/.config/linux/system/module/common/Nvim.nix +++ b/.config/linux/system/module/common/Nvim.nix @@ -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") ''; }; }; diff --git a/.bashrc b/.config/linux/system/module/common/bash/Bashrc.sh similarity index 86% rename from .bashrc rename to .config/linux/system/module/common/bash/Bashrc.sh index 94c7898..4bca11e 100644 --- a/.bashrc +++ b/.config/linux/system/module/common/bash/Bashrc.sh @@ -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 diff --git a/.config/bash/module/Android.sh b/.config/linux/system/module/common/bash/module/Android.sh similarity index 100% rename from .config/bash/module/Android.sh rename to .config/linux/system/module/common/bash/module/Android.sh diff --git a/.config/bash/module/Archive.sh b/.config/linux/system/module/common/bash/module/Archive.sh similarity index 100% rename from .config/bash/module/Archive.sh rename to .config/linux/system/module/common/bash/module/Archive.sh diff --git a/.config/bash/module/Autocomplete.sh b/.config/linux/system/module/common/bash/module/Autocomplete.sh similarity index 100% rename from .config/bash/module/Autocomplete.sh rename to .config/linux/system/module/common/bash/module/Autocomplete.sh diff --git a/.config/bash/module/Battery.sh b/.config/linux/system/module/common/bash/module/Battery.sh similarity index 100% rename from .config/bash/module/Battery.sh rename to .config/linux/system/module/common/bash/module/Battery.sh diff --git a/.config/bash/module/Bootstrap.sh b/.config/linux/system/module/common/bash/module/Bootstrap.sh similarity index 100% rename from .config/bash/module/Bootstrap.sh rename to .config/linux/system/module/common/bash/module/Bootstrap.sh diff --git a/.config/bash/module/Cd.sh b/.config/linux/system/module/common/bash/module/Cd.sh similarity index 100% rename from .config/bash/module/Cd.sh rename to .config/linux/system/module/common/bash/module/Cd.sh diff --git a/.config/bash/module/Checksum.sh b/.config/linux/system/module/common/bash/module/Checksum.sh similarity index 100% rename from .config/bash/module/Checksum.sh rename to .config/linux/system/module/common/bash/module/Checksum.sh diff --git a/.config/bash/module/Chmod.sh b/.config/linux/system/module/common/bash/module/Chmod.sh similarity index 100% rename from .config/bash/module/Chmod.sh rename to .config/linux/system/module/common/bash/module/Chmod.sh diff --git a/.config/bash/module/Color.sh b/.config/linux/system/module/common/bash/module/Color.sh similarity index 100% rename from .config/bash/module/Color.sh rename to .config/linux/system/module/common/bash/module/Color.sh diff --git a/.config/bash/module/Container.sh b/.config/linux/system/module/common/bash/module/Container.sh similarity index 100% rename from .config/bash/module/Container.sh rename to .config/linux/system/module/common/bash/module/Container.sh diff --git a/.config/bash/module/Copypaste.sh b/.config/linux/system/module/common/bash/module/Copypaste.sh similarity index 100% rename from .config/bash/module/Copypaste.sh rename to .config/linux/system/module/common/bash/module/Copypaste.sh diff --git a/.config/bash/module/Cp.sh b/.config/linux/system/module/common/bash/module/Cp.sh similarity index 100% rename from .config/bash/module/Cp.sh rename to .config/linux/system/module/common/bash/module/Cp.sh diff --git a/.config/bash/module/Date.sh b/.config/linux/system/module/common/bash/module/Date.sh similarity index 100% rename from .config/bash/module/Date.sh rename to .config/linux/system/module/common/bash/module/Date.sh diff --git a/.config/bash/module/Dconf.sh b/.config/linux/system/module/common/bash/module/Dconf.sh similarity index 100% rename from .config/bash/module/Dconf.sh rename to .config/linux/system/module/common/bash/module/Dconf.sh diff --git a/.config/bash/module/Disk.sh b/.config/linux/system/module/common/bash/module/Disk.sh similarity index 100% rename from .config/bash/module/Disk.sh rename to .config/linux/system/module/common/bash/module/Disk.sh diff --git a/.config/bash/module/Distrobox.sh b/.config/linux/system/module/common/bash/module/Distrobox.sh similarity index 100% rename from .config/bash/module/Distrobox.sh rename to .config/linux/system/module/common/bash/module/Distrobox.sh diff --git a/.config/bash/module/Doc.sh b/.config/linux/system/module/common/bash/module/Doc.sh similarity index 100% rename from .config/bash/module/Doc.sh rename to .config/linux/system/module/common/bash/module/Doc.sh diff --git a/.config/bash/module/Docker.sh b/.config/linux/system/module/common/bash/module/Docker.sh similarity index 100% rename from .config/bash/module/Docker.sh rename to .config/linux/system/module/common/bash/module/Docker.sh diff --git a/.config/bash/module/Dvd.sh b/.config/linux/system/module/common/bash/module/Dvd.sh similarity index 100% rename from .config/bash/module/Dvd.sh rename to .config/linux/system/module/common/bash/module/Dvd.sh diff --git a/.config/bash/module/Ffmpeg.sh b/.config/linux/system/module/common/bash/module/Ffmpeg.sh similarity index 100% rename from .config/bash/module/Ffmpeg.sh rename to .config/linux/system/module/common/bash/module/Ffmpeg.sh diff --git a/.config/bash/module/File.sh b/.config/linux/system/module/common/bash/module/File.sh similarity index 100% rename from .config/bash/module/File.sh rename to .config/linux/system/module/common/bash/module/File.sh diff --git a/.config/bash/module/Find.sh b/.config/linux/system/module/common/bash/module/Find.sh similarity index 100% rename from .config/bash/module/Find.sh rename to .config/linux/system/module/common/bash/module/Find.sh diff --git a/.config/bash/module/Fix.sh b/.config/linux/system/module/common/bash/module/Fix.sh similarity index 100% rename from .config/bash/module/Fix.sh rename to .config/linux/system/module/common/bash/module/Fix.sh diff --git a/.config/bash/module/Git.sh b/.config/linux/system/module/common/bash/module/Git.sh similarity index 100% rename from .config/bash/module/Git.sh rename to .config/linux/system/module/common/bash/module/Git.sh diff --git a/.config/bash/module/Group.sh b/.config/linux/system/module/common/bash/module/Group.sh similarity index 100% rename from .config/bash/module/Group.sh rename to .config/linux/system/module/common/bash/module/Group.sh diff --git a/.config/bash/module/Help.sh b/.config/linux/system/module/common/bash/module/Help.sh similarity index 100% rename from .config/bash/module/Help.sh rename to .config/linux/system/module/common/bash/module/Help.sh diff --git a/.config/bash/module/Ls.sh b/.config/linux/system/module/common/bash/module/Ls.sh similarity index 100% rename from .config/bash/module/Ls.sh rename to .config/linux/system/module/common/bash/module/Ls.sh diff --git a/.config/bash/module/Markdown.sh b/.config/linux/system/module/common/bash/module/Markdown.sh similarity index 100% rename from .config/bash/module/Markdown.sh rename to .config/linux/system/module/common/bash/module/Markdown.sh diff --git a/.config/bash/module/Name.sh b/.config/linux/system/module/common/bash/module/Name.sh similarity index 100% rename from .config/bash/module/Name.sh rename to .config/linux/system/module/common/bash/module/Name.sh diff --git a/.config/bash/module/Nix.sh b/.config/linux/system/module/common/bash/module/Nix.sh similarity index 100% rename from .config/bash/module/Nix.sh rename to .config/linux/system/module/common/bash/module/Nix.sh diff --git a/.config/bash/module/Notify.sh b/.config/linux/system/module/common/bash/module/Notify.sh similarity index 100% rename from .config/bash/module/Notify.sh rename to .config/linux/system/module/common/bash/module/Notify.sh diff --git a/.config/bash/module/Own.sh b/.config/linux/system/module/common/bash/module/Own.sh similarity index 100% rename from .config/bash/module/Own.sh rename to .config/linux/system/module/common/bash/module/Own.sh diff --git a/.config/bash/module/Pack.sh b/.config/linux/system/module/common/bash/module/Pack.sh similarity index 100% rename from .config/bash/module/Pack.sh rename to .config/linux/system/module/common/bash/module/Pack.sh diff --git a/.config/bash/module/Parse.sh b/.config/linux/system/module/common/bash/module/Parse.sh similarity index 100% rename from .config/bash/module/Parse.sh rename to .config/linux/system/module/common/bash/module/Parse.sh diff --git a/.config/bash/module/Permission.sh b/.config/linux/system/module/common/bash/module/Permission.sh similarity index 100% rename from .config/bash/module/Permission.sh rename to .config/linux/system/module/common/bash/module/Permission.sh diff --git a/.config/bash/module/Prune.sh b/.config/linux/system/module/common/bash/module/Prune.sh similarity index 100% rename from .config/bash/module/Prune.sh rename to .config/linux/system/module/common/bash/module/Prune.sh diff --git a/.config/bash/module/Ps.sh b/.config/linux/system/module/common/bash/module/Ps.sh similarity index 100% rename from .config/bash/module/Ps.sh rename to .config/linux/system/module/common/bash/module/Ps.sh diff --git a/.config/bash/module/Ps1.sh b/.config/linux/system/module/common/bash/module/Ps1.sh similarity index 100% rename from .config/bash/module/Ps1.sh rename to .config/linux/system/module/common/bash/module/Ps1.sh diff --git a/.config/bash/module/Random.sh b/.config/linux/system/module/common/bash/module/Random.sh similarity index 100% rename from .config/bash/module/Random.sh rename to .config/linux/system/module/common/bash/module/Random.sh diff --git a/.config/bash/module/Recursive.sh b/.config/linux/system/module/common/bash/module/Recursive.sh similarity index 100% rename from .config/bash/module/Recursive.sh rename to .config/linux/system/module/common/bash/module/Recursive.sh diff --git a/.config/bash/module/Shopt.sh b/.config/linux/system/module/common/bash/module/Shopt.sh similarity index 100% rename from .config/bash/module/Shopt.sh rename to .config/linux/system/module/common/bash/module/Shopt.sh diff --git a/.config/bash/module/Su.sh b/.config/linux/system/module/common/bash/module/Su.sh similarity index 100% rename from .config/bash/module/Su.sh rename to .config/linux/system/module/common/bash/module/Su.sh diff --git a/.config/bash/module/Terminal.sh b/.config/linux/system/module/common/bash/module/Terminal.sh similarity index 100% rename from .config/bash/module/Terminal.sh rename to .config/linux/system/module/common/bash/module/Terminal.sh diff --git a/.config/bash/module/Tmp.sh b/.config/linux/system/module/common/bash/module/Tmp.sh similarity index 100% rename from .config/bash/module/Tmp.sh rename to .config/linux/system/module/common/bash/module/Tmp.sh diff --git a/.config/bash/module/Tmux.sh b/.config/linux/system/module/common/bash/module/Tmux.sh similarity index 100% rename from .config/bash/module/Tmux.sh rename to .config/linux/system/module/common/bash/module/Tmux.sh diff --git a/.config/bash/module/Todo.sh b/.config/linux/system/module/common/bash/module/Todo.sh similarity index 100% rename from .config/bash/module/Todo.sh rename to .config/linux/system/module/common/bash/module/Todo.sh diff --git a/.config/bash/module/Transcode.sh b/.config/linux/system/module/common/bash/module/Transcode.sh similarity index 100% rename from .config/bash/module/Transcode.sh rename to .config/linux/system/module/common/bash/module/Transcode.sh diff --git a/.config/bash/module/Try.sh b/.config/linux/system/module/common/bash/module/Try.sh similarity index 100% rename from .config/bash/module/Try.sh rename to .config/linux/system/module/common/bash/module/Try.sh diff --git a/.config/bash/module/Util.sh b/.config/linux/system/module/common/bash/module/Util.sh similarity index 100% rename from .config/bash/module/Util.sh rename to .config/linux/system/module/common/bash/module/Util.sh diff --git a/.config/bash/module/Vdl.sh b/.config/linux/system/module/common/bash/module/Vdl.sh similarity index 100% rename from .config/bash/module/Vdl.sh rename to .config/linux/system/module/common/bash/module/Vdl.sh diff --git a/.config/bash/module/Vi.sh b/.config/linux/system/module/common/bash/module/Vi.sh similarity index 100% rename from .config/bash/module/Vi.sh rename to .config/linux/system/module/common/bash/module/Vi.sh diff --git a/.config/bash/module/Wallpaper.sh b/.config/linux/system/module/common/bash/module/Wallpaper.sh similarity index 100% rename from .config/bash/module/Wallpaper.sh rename to .config/linux/system/module/common/bash/module/Wallpaper.sh diff --git a/.config/bash/module/Watch.sh b/.config/linux/system/module/common/bash/module/Watch.sh similarity index 100% rename from .config/bash/module/Watch.sh rename to .config/linux/system/module/common/bash/module/Watch.sh diff --git a/.gitignore b/.gitignore index 135ef6b..9e1ac54 100644 --- a/.gitignore +++ b/.gitignore @@ -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/**