From ad7291db2540626eb85754293dc01974fd0a4eba Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Tue, 18 Jul 2023 06:35:49 +0000 Subject: [PATCH] Latest --- home/.chezmoiexternal.toml.tmpl | 6 +- ...n_onchange_after_08-symlink-custom.sh.tmpl | 26 ------- .../run_onchange_after_11-symlink-nvim.tmpl | 10 ++- .../run_onchange_after_39-vim-plugins.sh.tmpl | 2 +- .../run_onchange_after_57-netdata.sh.tmpl | 44 +++++++---- ...onchange_after_80-bash-completions.sh.tmpl | 18 ++--- .../{nvim-custom => coc}/coc-settings.json | 0 home/dot_config/nvim-custom/init.lua | 3 - home/dot_config/shell/exports.sh.tmpl | 12 +-- home/dot_config/shell/profile.sh.tmpl | 10 +-- home/dot_config/vim/vimrc | 69 +++++++++--------- home/dot_local/share/nvchad/chadrc.lua | 2 +- home/dot_local/share/nvchad/themes/jabuti.lua | 73 ------------------- scripts/partials/pfsense | 45 ++++++++++++ scripts/src/pfsense.sh.tmpl | 11 +++ software.yml | 4 +- 16 files changed, 155 insertions(+), 180 deletions(-) delete mode 100644 home/.chezmoiscripts/universal/run_onchange_after_08-symlink-custom.sh.tmpl rename home/dot_config/{nvim-custom => coc}/coc-settings.json (100%) delete mode 100644 home/dot_config/nvim-custom/init.lua delete mode 100644 home/dot_local/share/nvchad/themes/jabuti.lua create mode 100644 scripts/partials/pfsense create mode 100644 scripts/src/pfsense.sh.tmpl diff --git a/home/.chezmoiexternal.toml.tmpl b/home/.chezmoiexternal.toml.tmpl index bb80ad1a..93375112 100644 --- a/home/.chezmoiexternal.toml.tmpl +++ b/home/.chezmoiexternal.toml.tmpl @@ -3,7 +3,7 @@ {{- $vimPlugins := .softwarePlugins.vim.plugins }} {{- range $vimPlugin := $vimPlugins }} {{- $folderName := trimSuffix ".git" (last (splitList "/" $vimPlugin)) }} -[".vim/plugged/{{ $folderName }}"] +[".config/vim/plugged/{{ $folderName }}"] type = "git-repo" url = "{{ $vimPlugin }}" refreshPeriod = "{{ $refreshPeriod }}" @@ -11,7 +11,7 @@ pull.args = ["--ff-only"] {{- end }} ### coc.nvim VIM plugin requires custom branch "release" -[".vim/plugged/coc.nvim"] +[".config/vim/plugged/coc.nvim"] type = "git-repo" url = "https://github.com/neoclide/coc.nvim.git" refreshPeriod = "{{ $refreshPeriod }}" @@ -133,7 +133,7 @@ type = "file" url = "https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.zsh" refreshPeriod = "{{ $refreshPeriod }}" -[".vim/autoload/plug.vim"] +[".config/vim/autoload/plug.vim"] type = "file" url = "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" refreshPeriod = "{{ $refreshPeriod }}" diff --git a/home/.chezmoiscripts/universal/run_onchange_after_08-symlink-custom.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_08-symlink-custom.sh.tmpl deleted file mode 100644 index 7826c0a1..00000000 --- a/home/.chezmoiscripts/universal/run_onchange_after_08-symlink-custom.sh.tmpl +++ /dev/null @@ -1,26 +0,0 @@ -{{- if (ne .host.distro.family "windows") -}} -#!/usr/bin/env bash -# @file NvChad NVIM Customization Symlink -# @brief Symlinks `${XDG_CONFIG_HOME:-$HOME/.config}/nvim-custom` to the main NVIM configuration -# @description -# NVIM is a visual text editor for the terminal. It is like a fancy, improved version of VIM with compatibility -# for the same plugins and some other ones as well. The default configuration of Install Doctor integrates -# a well-received and popular shared NVIM configuration called [NvChad](https://github.com/NvChad/NvChad). -# -# To make it easy to update NVIM to the latest version as well as introduce custom configuration parameters for NvChad, -# this script symlinks the custom configuration from `${XDG_CONFIG_HOME:-$HOME/.config}/nvim-custom` to `${XDG_CONFIG_HOME:-$HOME/.config}/nvim/lua/custom` -# which is the location that NvChad's documentation recommends placing custom settings in. - -{{ includeTemplate "universal/profile" }} -{{ includeTemplate "universal/logg" }} - -### Symlink custom code for Neovim configuration -if [ ! -d "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/lua/custom" ]; then - logg info "Linking ${XDG_CONFIG_HOME:-$HOME/.config}/nvim-custom to ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/lua/custom" - logg info "Changes should go in ${XDG_CONFIG_HOME:-$HOME/.config}/nvim-custom" - ln -s "${XDG_CONFIG_HOME:-$HOME/.config}/nvim-custom" "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/lua/custom" -else - logg info "${XDG_CONFIG_HOME:-$HOME/.config}/nvim-custom appears to already be symlinked to ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/lua/custom" -fi - -{{ end -}} diff --git a/home/.chezmoiscripts/universal/run_onchange_after_11-symlink-nvim.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_11-symlink-nvim.tmpl index 34c9315e..7951392e 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_11-symlink-nvim.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_11-symlink-nvim.tmpl @@ -1,8 +1,16 @@ {{- if (ne .host.distro.family "windows") -}} #!/usr/bin/env bash # @file Neovim Configuration -# @brief This script configures Neovim by applying the configuration stored in `${XDG_DATA_HOME:-$HOME/.config}/nvim-custom/init.lua` if the `nvim` application is available +# @brief This script configures Neovim by applying the configuration stored in `${XDG_DATA_HOME:-$HOME/.local/share}/nvchad/init.lua` if the `nvim` application is available # @description +# NVIM is a visual text editor for the terminal. It is like a fancy, improved version of VIM with compatibility +# for the same plugins and some other ones as well. The default configuration of Install Doctor integrates +# a well-received and popular shared NVIM configuration called [NvChad](https://github.com/NvChad/NvChad). +# +# To make it easy to update NVIM to the latest version as well as introduce custom configuration parameters for NvChad, +# this script symlinks the custom configuration from `${XDG_DATA_HOME:-$HOME/.local/share}/nvchad` to `${XDG_CONFIG_HOME:-$HOME/.config}/nvim/lua/custom` +# which is the location that NvChad's documentation recommends placing custom settings in. +# # This script applies the Neovim configuration stored in `${XDG_DATA_HOME:-$HOME/.local/share}/nvchad/init.lua` if nvim is installed. # The custom configuration was adapted from [linuxmobile/nvchad-v2](https://github.com/linuxmobile/nvchad-v2). # diff --git a/home/.chezmoiscripts/universal/run_onchange_after_39-vim-plugins.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_39-vim-plugins.sh.tmpl index f45ec615..c2e4df30 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_39-vim-plugins.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_39-vim-plugins.sh.tmpl @@ -9,7 +9,7 @@ function vimSetup() { ### Run the VIM plugin install routine if command -v vim > /dev/null; then - vim +PlugInstall +qall 2>/dev/null && logg success 'Successfully ran `vim +PlugInstall +qall`' || logg error 'Failed to run `vim +PlugInstall +qll`' + vim +PlugInstall +qall > /dev/null && logg success 'Successfully ran `vim +PlugInstall +qall`' || logg error 'Failed to run `vim +PlugInstall +qll`' fi } vimSetup diff --git a/home/.chezmoiscripts/universal/run_onchange_after_57-netdata.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_57-netdata.sh.tmpl index 7619a5e1..b53f51ea 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_57-netdata.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_57-netdata.sh.tmpl @@ -13,6 +13,17 @@ {{ includeTemplate "universal/profile" }} {{ includeTemplate "universal/logg" }} +ensureNetdataOwnership() { + ### Ensure /usr/local/var/lib/netdata/cloud.d is owned by user + if [ -d /usr/local/var/lib/netdata ]; then + logg info 'Ensuring permissions are correct on /usr/local/var/lib/netdata' + sudo chown -Rf netdata /usr/local/var/lib/netdata + elif [ -d /var/lib/netdata ]; then + logg info 'Ensuring permissions are correct on /var/lib/netdata' + sudo chown -Rf netdata /var/lib/netdata + fi +} + ### Claim the instance with Netdata Cloud if command -v netdata-claim.sh > /dev/null; then NETDATA_TOKEN="{{- if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NETDATA_TOKEN")) -}}{{- includeTemplate "secrets/NETDATA_TOKEN" | decrypt | trim -}}{{- else -}}{{- env "NETDATA_TOKEN" -}}{{- end -}}" @@ -22,14 +33,7 @@ if command -v netdata-claim.sh > /dev/null; then sudo add-user netdata fi - ### Ensure /usr/local/var/lib/netdata/cloud.d is owned by user - if [ -d /usr/local/var/lib/netdata ]; then - logg info 'Ensuring permissions are correct on /usr/local/var/lib/netdata' - sudo chown -Rf netdata:netdata /usr/local/var/lib/netdata - elif [ -d /var/lib/netdata ]; then - logg info 'Ensuring permissions are correct on /var/lib/netdata' - sudo chown -Rf netdata:netdata /var/lib/netdata - fi + ensureNetdataOwnership # netdata-claim.sh must be run as netdata user logg info "Netdata room: $NETDATA_ROOM" @@ -106,18 +110,26 @@ if command -v netdata-claim.sh > /dev/null; then logg info 'Installing the module and configuration file' sudo "$DEBSECAN_GIT/debsecan.chart.py" /usr/libexec/netdata/python.d/debsecan.chart.py sudo "$DEBSECAN_GIT/debsecan.conf" /etc/netdata/python.d/debsecan.conf - - # Restart Netdata service - if command -v systemctl > /dev/null; then - logg info 'Restarting netdata service' - sudo systemctl restart netdata - else - logg warn '`systemctl` is not available' - fi else logg warn '`apt-get` is available but `debsecan` is not available in the PATH or is not installed' fi fi + + ensureNetdataOwnership + + ### Restart Netdata service + if command -v systemctl > /dev/null; then + logg info 'Enabling netdata service' + sudo systemctl enable netdata + logg info 'Restarting netdata service' + sudo systemctl restart netdata + elif [ -d /Applications ] && [ -d /System ]; then + logg info 'Starting / enabling netdata service' + brew services restart netdata + else + logg warn '`systemctl` is not available' + fi + else logg info '`netdata-claim.sh` is not available in the PATH' fi diff --git a/home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.sh.tmpl index 72c27864..64e172be 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.sh.tmpl @@ -23,7 +23,7 @@ COMPLETION_DIR="$HOME/.local/share/bash-completion/completions" mkdir -p "$COMPLETION_DIR" ### Aqua -if command -v aqua &> /dev/null; then +if command -v aqua > /dev/null; then aqua completion bash > "$COMPLETION_DIR/aqua.bash" elif [ -f "$COMPLETION_DIR/aqua.bash" ]; then rm -f "$COMPLETION_DIR/aqua.bash" @@ -45,7 +45,7 @@ fi ### fd if command -v fd > /dev/null && command -v brew > /dev/null && [ -f "$(brew --prefix fd)/etc/bash_completion.d/fd" ]; then - cp "$(brew --prefix fd)/etc/bash_completion.d/fd" "$COMPLETION_DIR/fd.bash" + cp -f "$(brew --prefix fd)/etc/bash_completion.d/fd" "$COMPLETION_DIR/fd.bash" elif [ -f "$COMPLETION_DIR/fd.bash" ]; then rm -f "$COMPLETION_DIR/fd.bash" fi @@ -59,8 +59,8 @@ fi ### fzf if command -v fzf > /dev/null && command -v brew > /dev/null && [ -f "$(brew --prefix fzf)/shell/completion.bash" ]; then - cp "$(brew --prefix fzf)/shell/completion.bash" "$COMPLETION_DIR/fzf.bash" - cp "$(brew --prefix fzf)/shell/key-bindings.bash" "$COMPLETION_DIR/fzf-key-bindings.bash" + cp -f "$(brew --prefix fzf)/shell/completion.bash" "$COMPLETION_DIR/fzf.bash" + cp -f "$(brew --prefix fzf)/shell/key-bindings.bash" "$COMPLETION_DIR/fzf-key-bindings.bash" elif [ -f "$COMPLETION_DIR/fzf.bash" ]; then rm -f "$COMPLETION_DIR/fzf.bash" rm -f "$COMPLETION_DIR/fzf-key-bindings.bash" @@ -75,7 +75,7 @@ fi ### Googler if command -v googler > /dev/null && command -v brew > /dev/null && [ -f "$(brew --prefix googler)/etc/bash_completion.d/googler-completion.bash" ]; then - cp "$(brew --prefix googler)/etc/bash_completion.d/googler-completion.bash" "$COMPLETION_DIR/googler.bash" + cp -f "$(brew --prefix googler)/etc/bash_completion.d/googler-completion.bash" "$COMPLETION_DIR/googler.bash" elif [ -f "$COMPLETION_DIR/googler.bash" ]; then rm -f "$COMPLETION_DIR/googler.bash" fi @@ -96,7 +96,7 @@ fi ### Hyperfine if command -v hyperfine > /dev/null && command -v brew > /dev/null && [ -f "$(brew --prefix hyperfine)/etc/bash_completion.d/hyperfine.bash" ]; then - cp "$(brew --prefix hyperfine)/etc/bash_completion.d/hyperfine.bash" "$COMPLETION_DIR/hyperfine.bash" + cp -f "$(brew --prefix hyperfine)/etc/bash_completion.d/hyperfine.bash" "$COMPLETION_DIR/hyperfine.bash" elif [ -f "$COMPLETION_DIR/hyperfine.bash" ]; then rm -f "$COMPLETION_DIR/hyperfine.bash" fi @@ -118,7 +118,7 @@ fi ### nb if command -v nb > /dev/null && command -v brew > /dev/null && [ -f "$(brew --prefix nb)/etc/bash_completion.d/nb.bash" ]; then - cp "$(brew --prefix nb)/etc/bash_completion.d/nb.bash" "$COMPLETION_DIR/nb.bash" + cp -f "$(brew --prefix nb)/etc/bash_completion.d/nb.bash" "$COMPLETION_DIR/nb.bash" elif [ -f "$COMPLETION_DIR/nb.bash" ]; then rm -f "$COMPLETION_DIR/nb.bash" fi @@ -132,7 +132,7 @@ fi ### nnn if command -v nnn > /dev/null && command -v brew > /dev/null && [ -f "$(brew --prefix nnn)/etc/bash_completion.d/nnn-completion.bash" ]; then - cp "$(brew --prefix nnn)/etc/bash_completion.d/nnn-completion.bash" "$COMPLETION_DIR/nnn.bash" + cp -f "$(brew --prefix nnn)/etc/bash_completion.d/nnn-completion.bash" "$COMPLETION_DIR/nnn.bash" elif [ -f "$COMPLETION_DIR/nnn.bash" ]; then rm -f "$COMPLETION_DIR/nnn.bash" fi @@ -187,7 +187,7 @@ elif [ -f "$COMPLETION_DIR/wp.bash" ]; then fi ### zoxide -if command -v zoxide >/dev/null; then +if command -v zoxide > /dev/null; then zoxide init bash > "$COMPLETION_DIR/zoxide.bash" elif [ -f "$COMPLETION_DIR/zoxide.bash" ]; then rm -f "$COMPLETION_DIR/zoxide.bash" diff --git a/home/dot_config/nvim-custom/coc-settings.json b/home/dot_config/coc/coc-settings.json similarity index 100% rename from home/dot_config/nvim-custom/coc-settings.json rename to home/dot_config/coc/coc-settings.json diff --git a/home/dot_config/nvim-custom/init.lua b/home/dot_config/nvim-custom/init.lua deleted file mode 100644 index e7c0a38a..00000000 --- a/home/dot_config/nvim-custom/init.lua +++ /dev/null @@ -1,3 +0,0 @@ -if executable('volta') - let g:node_host_prog = trim(system("volta which neovim-node-host")) -endif \ No newline at end of file diff --git a/home/dot_config/shell/exports.sh.tmpl b/home/dot_config/shell/exports.sh.tmpl index 5d570ff1..2370e4cf 100644 --- a/home/dot_config/shell/exports.sh.tmpl +++ b/home/dot_config/shell/exports.sh.tmpl @@ -432,24 +432,24 @@ export SAVEHIST=50000 ### Editor {{ if not .host.headless }} if command -v codium > /dev/null; then - export EDITOR='codium --wait' + export EDITOR='codium' export VISUAL="$EDITOR" elif command -v code > /dev/null; then - export EDITOR='code --wait' + export EDITOR='code' export VISUAL="$EDITOR" else # Source: https://unix.stackexchange.com/questions/4859/visual-vs-editor-what-s-the-difference - export EDITOR='vi -e' + export EDITOR='vi' if command -v nvim > /dev/null; then - export VISUAL='nvim -e' + export VISUAL='nvim' else export VISUAL="$EDITOR" fi fi {{ else }} -export EDITOR='vi -e' +export EDITOR='vi' if command -v nvim > /dev/null; then - export VISUAL='nvim -e' + export VISUAL='nvim' export PATH="$PATH:$HOME/.local/share/nvim/bin" else export VISUAL="$EDITOR" diff --git a/home/dot_config/shell/profile.sh.tmpl b/home/dot_config/shell/profile.sh.tmpl index e17a846f..40e6e580 100644 --- a/home/dot_config/shell/profile.sh.tmpl +++ b/home/dot_config/shell/profile.sh.tmpl @@ -80,11 +80,6 @@ if [ "$BASH_SUPPORT" = 'true' ]; then fi fi - ### ASDF - if [ -f "$ASDF_DIR/asdf.sh" ]; then - . "$ASDF_DIR/asdf.sh" - fi - ### Directory Colors if [ -f "$XDG_CONFIG_HOME/shell/lscolors.sh" ]; then . "$XDG_CONFIG_HOME/shell/lscolors.sh" @@ -148,6 +143,11 @@ elif [ -f "$SDKMAN_DIR/bin/sdkman-init.sh" ]; then . "$SDKMAN_DIR/bin/sdkman-init.sh" fi +### ASDF +if [ -f "$ASDF_DIR/asdf.sh" ]; then + . "$ASDF_DIR/asdf.sh" +fi + ### Tea # TODO: Fix this so it does not cause errors as Chezmoi runs # if command -v tea > /dev/null; then diff --git a/home/dot_config/vim/vimrc b/home/dot_config/vim/vimrc index a94ec82c..bd0deb3f 100644 --- a/home/dot_config/vim/vimrc +++ b/home/dot_config/vim/vimrc @@ -1,40 +1,8 @@ -silent! call plug#begin() -Plug '~/.vim/plugged/ale' -Plug '~/.vim/plugged/copilot.vim' -Plug '~/.vim/plugged/dockerfile.vim' -Plug '~/.vim/plugged/editorconfig-vim' -Plug '~/.vim/plugged/fzf.vim' -Plug '~/.vim/plugged/fzf' -Plug '~/.vim/plugged/lightline.vim' -Plug '~/.vim/plugged/nerdtree' -Plug '~/.vim/plugged/php.vim' -Plug '~/.vim/plugged/python-syntax' -Plug '~/.vim/plugged/syntastic' -Plug '~/.vim/plugged/typescript-vim' -Plug '~/.vim/plugged/vim-airline' -Plug '~/.vim/plugged/vim-carbon-now-sh' -Plug '~/.vim/plugged/vim-devicons' -Plug '~/.vim/plugged/vim-five' -Plug '~/.vim/plugged/vim-go' -Plug '~/.vim/plugged/vim-javascript' -Plug '~/.vim/plugged/vim-jsx' -Plug '~/.vim/plugged/vim-markdown' -Plug '~/.vim/plugged/vim-multiple-cursors' -Plug '~/.vim/plugged/vim-prettier' -Plug '~/.vim/plugged/vim-sensible' -Plug '~/.vim/plugged/vim-surround' -Plug '~/.vim/plugged/vimgutter' -Plug '~/.vim/plugged/zoxide.vim' -if executable('node') - Plug '~/.vim/plugged/coc.nvim' -endif -Plug '~/.vim/plugged/ansible-vim', {'do': './UltiSnips/generate.sh'} -call plug#end() - " Install Coc extensions " TODO: Add https://github.com/yuki-yano/fzf-preview.vim " TODO: Add https://github.com/tpope/vim-fugitive if executable('node') + let g:coc_global_config="$HOME/.config/coc/coc-settings.json" let g:coc_global_extensions = [ \ '@yaegassy/coc-ansible', \ '@yaegassy/coc-nginx', @@ -122,5 +90,36 @@ set encoding=UTF-8 " Set location of viminfo file set viminfo+=n~/.config/vim/viminfo -" Automatically apply with Chezmoi anytime a source file is modified -autocmd BufWritePost ~/.local/share/chezmoi/* ! chezmoi apply --source-path "%" +silent! call plug#begin() +Plug '~/.config/vim/plugged/ale' +Plug '~/.config/vim/plugged/copilot.vim' +Plug '~/.config/vim/plugged/dockerfile.vim' +Plug '~/.config/vim/plugged/editorconfig-vim' +Plug '~/.config/vim/plugged/fzf.vim' +Plug '~/.config/vim/plugged/fzf' +Plug '~/.config/vim/plugged/lightline.vim' +Plug '~/.config/vim/plugged/nerdtree' +Plug '~/.config/vim/plugged/php.vim' +Plug '~/.config/vim/plugged/python-syntax' +Plug '~/.config/vim/plugged/syntastic' +Plug '~/.config/vim/plugged/typescript-vim' +Plug '~/.config/vim/plugged/vim-airline' +Plug '~/.config/vim/plugged/vim-carbon-now-sh' +Plug '~/.config/vim/plugged/vim-devicons' +Plug '~/.config/vim/plugged/vim-five' +Plug '~/.config/vim/plugged/vim-go' +Plug '~/.config/vim/plugged/vim-javascript' +Plug '~/.config/vim/plugged/vim-jsx' +Plug '~/.config/vim/plugged/vim-markdown' +Plug '~/.config/vim/plugged/vim-multiple-cursors' +Plug '~/.config/vim/plugged/vim-prettier' +Plug '~/.config/vim/plugged/vim-sensible' +Plug '~/.config/vim/plugged/vim-surround' +Plug '~/.config/vim/plugged/vimgutter' +Plug '~/.config/vim/plugged/zoxide.vim' +if executable('node') + Plug '~/.config/vim/plugged/coc.nvim' +endif +Plug '~/.config/vim/plugged/ansible-vim', {'do': './UltiSnips/generate.sh'} +call plug#end() + diff --git a/home/dot_local/share/nvchad/chadrc.lua b/home/dot_local/share/nvchad/chadrc.lua index af172371..c023f72d 100644 --- a/home/dot_local/share/nvchad/chadrc.lua +++ b/home/dot_local/share/nvchad/chadrc.lua @@ -6,7 +6,7 @@ local highlights = require "custom.configs.highlights" M.ui = { - theme = "rxyhn", + theme = "sweetpastel", transparency = true, statusline = { diff --git a/home/dot_local/share/nvchad/themes/jabuti.lua b/home/dot_local/share/nvchad/themes/jabuti.lua deleted file mode 100644 index c45d41d1..00000000 --- a/home/dot_local/share/nvchad/themes/jabuti.lua +++ /dev/null @@ -1,73 +0,0 @@ --- Credits to original theme for existing https://github.com/shaunsingh/oxocarbon.nvim --- this is a modified version of it - -local M = {} - -M.base_30 = { - white = "#d9e0ee", -- original - darker_black = "#252632", - black = "#292A37", - black2 = "#252632", - one_bg = "#292a37", - one_bg2 = "#2e303e", - one_bg3 = "#303241", - grey = "#393a4d", - grey_fg = "#44465c", - grey_fg2 = "#9699b7", - light_grey = "#44465c", - red = "#ec6a88", - baby_pink = "#ff7eb6", - pink = "#be95ff", - line = "#383747", - green = "#3FC6DE", - vibrant_green = "#08bdba", - nord_blue = "#78a9ff", - blue = "#78a9ff", - yellow = "#efb993", - sun = "#efb993", - purple = "#936FDC", - dark_purple = "#936FDC", - teal = "#B5E8E0", - orange = "#efb993", - cyan = "#6be6e6", - statusline_bg = "#292A37", - lightbg = "#292A37", - pmenu_bg = "#6be6e6", - folder_bg = "#78a9ff", - lavender = "#c7d1ff", -} - -M.base_16 = { - base00 = "#292A37", - base01 = "#252632", - base02 = "#393a4d", - base03 = "#44465c", - base04 = "#dde1e6", - base05 = "#6be6e6", - base06 = "#ffffff", - base07 = "#08bdba", - base08 = "#ec6a88", - base09 = "#efb993", - base0A = "#ec6a88", - base0B = "#3FDAA4", - base0C = "#ff7eb6", - base0D = "#3FC6DE", - base0E = "#936FDC", - base0F = "#d9e0ee", -} - -M.polish_hl = { - Conditional = { - fg = M.base_30.nord_blue, - }, - - Tag = { - fg = M.base_30.red, - }, -} - -M.type = "dark" - -M = require("base46").override_theme(M, "jabuti") - -return M \ No newline at end of file diff --git a/scripts/partials/pfsense b/scripts/partials/pfsense new file mode 100644 index 00000000..2eb1cef5 --- /dev/null +++ b/scripts/partials/pfsense @@ -0,0 +1,45 @@ + +### Enable FreeBSD package repo +logg info 'Enabling FreeBSD package repo' +FILE_PATH="/usr/local/etc/pkg/repos/pfSense.conf" +TMP_FILE=$(mktemp) +REPLACEMENT="FreeBSD: { enabled: yes }" +echo "$REPLACEMENT" > "$TMP_FILE" +tail -n +2 "$FILE_PATH" >> "$TMP_FILE" +mv -f "$TMP_FILE" "$FILE_PATH" +rm -f "$TMP_FILE" + +### Install Netdata / dependencies +logg info 'Installing Netdata system package dependencies' +pkg update +pkg install -y curl pkgconf bash e2fsprogs-libuuid libuv nano +pkg install -y json-c-0.15_1 +pkg install -y py39-certifi-2023.5.7 +pkg install -y py39-asn1crypto +pkg install -y py39-pycparser +pkg install -y py39-cffi +pkg install -y py39-six +pkg install -y py39-cryptography +pkg install -y py39-idna +pkg install -y py39-openssl +pkg install -y py39-pysocks +pkg install -y py39-urllib3 +pkg install -y py39-yaml +pkg install -y netdata + +### Modify Netdata configuration +logg info 'Configuring Netdata to work with Netdata Cloud' +# TODO: Add below to netdata.conf +# bind to = 127.0.0.1 to bind to = 0.0.0.0 +NETDATA_CLOUD_API_TOKEN="YOUR_API_TOKEN_HERE" +cat < /usr/local/etc/netdata/netdata.conf +[backend] + enabled = yes + data source = netdata + destination = https://app.netdata.cloud + api key = ${NETDATA_CLOUD_API_TOKEN} +EOF + +### Start Netdata +logg info 'Starting Netdata service' +service netdata onestart diff --git a/scripts/src/pfsense.sh.tmpl b/scripts/src/pfsense.sh.tmpl new file mode 100644 index 00000000..c0cda96c --- /dev/null +++ b/scripts/src/pfsense.sh.tmpl @@ -0,0 +1,11 @@ +#!/bin/sh +# @file pfSense Setup +# @brief Configures pfSense +# @description +# This script sets up pfSense with features like: +# +# 1. [Netdata Cloud](https://learn.netdata.cloud/docs/installing/pfsense) + +{{ include "partials" "logg" }} + +{{ include "partials" "pfsense" }} diff --git a/software.yml b/software.yml index 80ee6326..ec93122a 100644 --- a/software.yml +++ b/software.yml @@ -417,6 +417,7 @@ softwarePackages: _bin: tomcat _github: https://github.com/apache/tomcat _name: Tomcat + _service: tomcat apt: tomcat brew: tomcat choco: tomcat @@ -867,7 +868,7 @@ softwarePackages: _github: https://github.com/AstroNvim/AstroNvim _home: https://astronvim.github.io/ _name: AstroNvim - _post: nvim --headless -c 'autocmd User PackerComplete quitall' & + _post: nvim --headless -c 'quitall' dockutil: _bin: dockutil _github: https://github.com/kcrawford/dockutil @@ -6865,6 +6866,7 @@ softwarePackages: _bin: xdotool _github: https://github.com/jordansissel/xdotool _name: xdotool + _post:brew:darwin: defaults write org.x.X11 enable_test_extensions -boolean true apt: xdotool brew: xdotool dnf: xdotool