nixos-server/modules/getNvim.nix
2026-01-24 16:43:58 +01:00

24 lines
607 B
Nix
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ pkgs, ... }: {
environment.systemPackages = [
(pkgs.writeShellScriptBin "get-nvim" ''
set -e
# 1. Define Variables
NVIM_CONFIG_DIR="$HOME/.config/nvim"
REPO_URL="https://github.com/MagicBOTAlex/NVimConfigs"
# 2. Delete Existing Config
if [ -d "$NVIM_CONFIG_DIR" ]; then
echo "🗑 Deleting existing Neovim configuration at $NVIM_CONFIG_DIR..."
rm -rf "$NVIM_CONFIG_DIR"
fi
# 3. Clone Fresh
echo " Cloning new Neovim Configs..."
git clone "$REPO_URL" "$NVIM_CONFIG_DIR"
echo " Done!"
'')
];
}