WSL NixOs, Neovim, Zsh, Commandbox, Windows Terminal, Powershell, Cmd, VsCode.
- Install chocolatey
- Install zLocation (equivelant to zoxide)
Install-Module ZLocation -Scope CurrentUser; Import-Module ZLocation; Add-Content -Value "
rn
rnImport-Module ZLocation
rn" -Encoding utf8 -Path $PROFILE.CurrentUserAllHosts
- use
z
like you wouldcd
and it will keep track of all your visited paths
- install oh-my-posh, neovim
choco install neovim oh-my-posh
- Symlink the Powershell Config (aliases, oh-my-posh, zoxide)
- New-Item -Path 'C:\Users\daniel.mejia\OneDrive - Psomas\Documents\PowerShell\Microsoft.PowerShell_profile.ps1' -ItemType SymbolicLink -Value 'C:\Users\daniel.mejia.dotfiles\Microsoft.PowerShell_profile.ps1'
- Symlink the WHKD Config (global keybindings)
- New-Item -Path 'C:\Users\daniel.mejia.config\whkdrc' -ItemType SymbolicLink -Value 'C:\Users\daniel.mejia.dotfiles\whkdrc'
- Install/Enable WSL 2
- Download installer from https://github.com/nix-community/NixOS-WSL
wsl --import <name-your-os> .\NixOS\ nixos-wsl.tar.gz --version 2
- Use powershell alias
nup
to enter distrowsl -d <name-your-os>
- Follow instructions from https://github.com/webmandman/nixos-wsl-starter
- Original repo comes with lunarvim, remove from home.nix config.
-- .dotfiles/Microsoft.Powershell_profile.ps1
This config files contains powershell aliases, oh-my-posh prompt, and zoxide (which has issues remembering my directories)
This folder will contain all configuration files for vscode, neovim, and commandbox, plus shell scripts to set shortcuts, aliases, commands.
Commandbox
-
- install script for commandbox bleeding edge
-
- download and set environment variables for Psomas
-
- run the recipe "essentials.boxr"
a. aliases
b. install global packages:
- cfconfig
- dotenv
- hostupdater
- run the recipe "essentials.boxr"
a. aliases
b. install global packages:
-
- install script for symbolic links
- dotfiles/neovim/ -> ~/.../"neovim install path" a.
- commandbox@latest -> ~/.Commandbox
- development branch for commandbox -> ~/.Commandbox
- Projects
-
- install script for psomas command "potree"
-
- install script for oh-my-bsh
-
- install script for projectweb
-
- install script for psomas tasks
-
- install script for api
-
- install script for intra
-
-
- install script for WSL2
-
- install script vscode extensions "code --install-extension ..." a. look into creating a bundle extension pack.
- all configurations and scripts will support windows 10 and Ubuntu and MacOS, maybe even NixOS.
** Install Ubuntu on WSL2 **
Any new installation will attempt to delete previous installations. Those files can not be in use - restart OS could do the trick.
- Powershell script:
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing
- Add-AppPackage .\Ubuntu.appx
- Or double-click the .appx file and it will launch a gui installer.
** Apt Package Manager **
Update the packages list sudo apt update
everytime before installing a new package or atleast once a day. Most popular packages update on a daily basis.
To reimage or wipe all data from Ubuntu image reset the app from Add/Remove Programs.
** Installing All Tools **
sudo apt update
to update local packages list and endpoints.sudo apt install git-all
git clone https://github.com/webmandman/dotfiles
sudo apt-get install fonts-powerline
sudo apt install zsh
zsh --version
chsh -s $(which zsh)
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
ln -s ~/dotfiles/.zshrc ~/.zshrc
sudo apt install tmux
ln -s ~/dotfiles/.tmux.conf ~/.tmux.conf
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
tmux source ~/.tmux.conf
export EDITOR="nvim"
- Install Neovim, then edit the git config(next step)
git config -e
, and change url to 'https://username:passwordtoken@github.com....'
** Installing Commandbox **
Get avialable versions: curl https://s3.amazonaws.com/downloads.ortussolutions.com/ortussolutions/commandbox/box-repo.json
TODO: create shell script, same logic as installcommandbox.ps1 in dotfiles. Follow this tutorial (Shell Scripting)[https://www.shellscript.sh/]. ETA: 1 day.
curl -O https://s3.amazonaws.com/downloads.ortussolutions.com/ortussolutions/commandbox/5.5.0-alpha/commandbox-bin-5.5.0-alpha.zip
unzip commandbox-bin-5.5.0-alpha.zip -d commandbox-be
sudo mv commandbox-be/box /usr/local/bin
sudo apt install openjdk-11-jdk
- 250bm+ with all dependencies
** Building Neovim Nightly **
(Building Neovim Docs)[https://github.com/neovim/neovim/wiki/Building-Neovim]
sudo apt-get install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip curl doxygen
git clone https://github.com/neovim/neovim
cd neovim
make CMAKE_BUILD_TYPE=Release
.- Error 'rename failed - permission denied' - restarting Ubuntu should do it.
- Build Type Options: Release, Debug, RelWithDebInfo
- Warning: Build Type was set as Release, however, :checkhealth says its Debug. Build command output shows this subcommand:
cd /home/udm/neovim/.deps && /usr/bin/cmake -E touch .third-party && cd build && cmake -G 'Ninja' -DCMAKE_BUILD_TYPE=Release
- Verify:
./build/bin/nvim --version | grep ^Build
- Install:
make CMAKE_INSTALL_PREFIX=$HOME/local/nvim install
- Added to PATH via .zshrc(end of file)
- Perhaps consider default install location (/usr/local/bin) and skip 'make INSTALL PREFIX'
- Plug plugin manager:
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- `ln -s -d ~/dotfiles/nvim ~/.config/nvim
- startup neovim, and
:PlugInstall
, then finally restart neovim.
Updating Neovim
make distclean
- deletes .deps and buildgit pull
- Continue with step 4 above.
** Useful commands **
- PATH, remove entry from end of path:
PATH=$(echo "$PATH" | sed -e 's/:~\/local\/nvim\/bin$//')
- Symlink command format: ln -s TARGET LINK_NAME
** Useful Commands **
- Symlink command format:
New-Item -Path C:\LinkDir -ItemType SymbolicLink -Value F:\RealDir
** IIS SSL/TLS **
Scan computer to see current settings:
choco install sslscan
sslscan <WEB_SERVER_IP>
Make TLS Changes
choco install iiscryptocli
iiscryptocli /backup servertlsbackup
iiscryptocli /template best
- restart computer