All Projects → David-Else → developer-workstation-setup-script

David-Else / developer-workstation-setup-script

Licence: other
Post-install script for Fedora and RHEL 8 clones to create your ultimate development environment

Programming Languages

lua
6591 projects
shell
77523 projects
Vim Script
2826 projects

Projects that are alternatives of or similar to developer-workstation-setup-script

distrobox
Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
Stars: ✭ 4,371 (+6234.78%)
Mutual labels:  fedora, almalinux
ansible-role-docker-ce
Ansible role to install Docker CE on AlmaLinux/Rocky/CentOS/Fedora/RHEL(Redhat)/Ubuntu/Debian/Mint/Raspbian
Stars: ✭ 73 (+5.8%)
Mutual labels:  fedora, almalinux
wsl-distrod
Distrod is a meta-distro for WSL 2 which installs Ubuntu, Arch, Debian, Gentoo, etc. with systemd in a minute for you. Distrod also has built-in auto-start feature on Windows startup and port forwarding ability.
Stars: ✭ 1,637 (+2272.46%)
Mutual labels:  fedora, almalinux
Openvpn Install
OpenVPN road warrior installer for Ubuntu, Debian, AlmaLinux, Rocky Linux, CentOS and Fedora
Stars: ✭ 14,199 (+20478.26%)
Mutual labels:  fedora, almalinux
packer-kvm
Create VM templates with Packer for usage with Libvirt/KVM virtualization : CentOS 7, CentOS 8, CentOS 8 Stream, Alma Linux, Rocky Linux, Bionic (Ubuntu 1804), Focal (Ubuntu 2004), Debian 11 (stable), Kali Linux, Fedora 33 and Fedora 34.
Stars: ✭ 99 (+43.48%)
Mutual labels:  fedora, almalinux
Autodesk-Fusion-360-for-Linux
This is a project, where I give you a way to use Autodesk Fusion 360 on Linux!
Stars: ✭ 810 (+1073.91%)
Mutual labels:  fedora
insaneworks-packer-template
CentOS 7-8 8Stream / AlmaLinux 8 / FreeBSD 12 - 13 x64 + VirtualBox / VMWare for Packer Template + FreeBSD 13 / AlmaLinux 9 + Parallels
Stars: ✭ 38 (-44.93%)
Mutual labels:  almalinux
sodalite
🪨 A Pantheon experience for rpm-ostree
Stars: ✭ 93 (+34.78%)
Mutual labels:  fedora
metalnetes
Create and manage multiple Kubernetes clusters using KVM on a bare metal Fedora 29 server. Includes helm + rook-ceph + nginx ingress + the stock analysis engine (jupyter + redis cluster + minio + automated cron jobs for data collection) - works on Kubernetes version v1.16.0 - 1.16.3 was not working
Stars: ✭ 37 (-46.38%)
Mutual labels:  fedora
fedora-ansible
Ansible playbooks for Fedora
Stars: ✭ 90 (+30.43%)
Mutual labels:  fedora
FireMarshal
Software workload management tool for RISC-V based SoC research. This is the default workload management tool for Chipyard and FireSim.
Stars: ✭ 37 (-46.38%)
Mutual labels:  fedora
piu
Cross platform package manager wrapper
Stars: ✭ 33 (-52.17%)
Mutual labels:  fedora
Dev-Setup
Automation scripts for setting up a basic development environment.
Stars: ✭ 19 (-72.46%)
Mutual labels:  setup-script
dotfiles
The best and strongest dotfiles. Editor: Neovim; Shell: zsh(zinit, powerlevel10k); Terminal: tmux, wezterm; Desktop: i3-gaps/sway, rofi, dunst; OS: ArchLinux, (Ubuntu/Fedora/CentOS)
Stars: ✭ 245 (+255.07%)
Mutual labels:  fedora
SOLIDWORKS-for-Linux
This is a project, where I give you a way to use SOLIDWORKS on Linux!
Stars: ✭ 122 (+76.81%)
Mutual labels:  fedora
installer-linux
💾 SinusBot Installer for Debian, Ubuntu and CentOS - Installs the SinusBot with a single command.
Stars: ✭ 28 (-59.42%)
Mutual labels:  fedora
Linux-Active-Directory-join-script
Active directory Join script for Ubuntu, Debian, CentOS, Linux Mint, Fedora, Kali, Elementary OS and Raspbian with built in failchcheck and debugmode for Ubuntu. "The most advanced and updated AD join script on GITHUB for Linux"
Stars: ✭ 97 (+40.58%)
Mutual labels:  fedora
rh024
Red Hat Enterprise Linux Technical Overview, affronta le pratiche di base per l'utilizzo di Linux e le attività di amministrazione del sistema.
Stars: ✭ 54 (-21.74%)
Mutual labels:  rhel8
LinuxMirrors
Linux 一键更换国内软件源
Stars: ✭ 623 (+802.9%)
Mutual labels:  fedora
Fedora-35-Post-Install-Guide
Things to do after installing Fedora 36
Stars: ✭ 31 (-55.07%)
Mutual labels:  fedora

Developer Workstation Setup Script

neo-70s

Welcome to your new ultimate development environment! A post-install setup script for developers that works on Fedora and all RHEL 8 clones. Enjoy the same software and desktop regardless of which Red Hat based distribution you choose.

News

31st March 2022: v2.1 released!

  • Add todo.txt file type
  • Use new Neovim 0.6.1 EPEL8 version instead of appimage for RHEL8 clones
  • Automatically install Neovim plugins before first run
  • Fix Neovim giving error without adding dictionary file
  • Update Neovim plugins pinned commits
  • Update binaries
  • Update nnn repo to Fedora 35 from 34
  • Improve user messages

24th Feb 2022: v2.0 has been released!

  • All software updated
  • Massive refactoring. Functions split out into modules and shared among install and setup scripts
  • New script for installing binaries that also uses GitHub CLI
  • More integration in the tools. For example, Delta diff viewer works for Lazygit and fzf.vim.
  • Frozen the Neovim plugins until Neovim 0.7 comes out. They are stable now.

Ansible looks cool, but it was too much work to learn just for this project.

Features

Fedora 34+ and RHEL 8+ clones compatibility

rocky-fedora-logos

Works across Fedora 34+, RHEL 8+ and all clones. You get to choose between cutting edge Fedora or stable RHEL clones. I suggest if you want stable, then choose Rocky.

To maintain parity with Fedora 34+, any package that's not available directly in RHEL is downloaded as:

  • A binary from GitHub or another trusted source
  • From flathub

Great software out of the box, easy to customize and choose your own

Development Browsers Graphics Sound and video Security and backup
Neovim Firefox Krita MPV KeepassXC
Node.js / Deno Chromium Shotwell Handbrake BorgBackup
Kitty (terminal) nnn file browser ImageMagick MKVToolNix
Lazygit (git terminal GUI)
GitHub CLI
Pandoc (document converter)
Shellcheck / Shfmt
Bat (cat replacement)
Ripgrep (grep replacement)
Delta (diff viewer)

Improved Gnome desktop and font settings

Gnome has been tweaked along with font settings for a better experience.

Neovim 0.6.1 with plugins and custom keybindings

Setup out of the box with the latest Neovim 0.6.1 and plugins configured to use fzf, ripgrep, delta and bat with an attractive Visual Studio Code theme

Neovim

Uses stow to install and mange dotfiles

All the software dotfiles are managed using stow, this makes them easy to alter and version on your computer.

Installation

RHEL clones must be installed using the workstation option

This script is designed to be run immediately after installing the operating system. If you are using a RHEL clone you should select workstation from the software selection option during installation.

RHEL

Use git to clone this repository

git clone https://github.com/David-Else/developer-workstation-setup-script
cd developer-workstation-setup-script

Customize the software selection before running the script

You will want to look at the installation script and modify it with your own preferences. This has been made as easy as possible, and should be self-explanatory.

The following arrays in install.sh contain all the packages that are common to Fedora and RHEL clones. They are set at the start of the script:

rpm_packages_to_remove=()
rpm_packages_to_install=()
flathub_packages_to_install=()
npm_global_packages_to_install=()

After that you can set packages to be added or removed for either RHEL clones or Fedora:

rhel_rpm_packages_to_remove=()
rhel_rpm_packages_to_install=()
rhel_flathub_packages_to_install=()

fedora_rpm_packages_to_remove=()
fedora_rpm_packages_to_install=()
fedora_flathub_packages_to_install=()

Inside a if then conditional the first set of arrays are modified depending on if you have installed Fedora or a RHEL clone.

detect_os

if [[ "$OS" == "valid_rhel" ]]; then

    rpm_packages_to_remove+=("${rhel_rpm_packages_to_remove[@]}")
    rpm_packages_to_install+=("${rhel_rpm_packages_to_install[@]}")
    flathub_packages_to_install+=("${rhel_flathub_packages_to_install[@]}")

elif [ "$OS" == "valid_fedora" ]; then

    rpm_packages_to_remove+=("${fedora_rpm_packages_to_remove[@]}")
    rpm_packages_to_install+=("${fedora_rpm_packages_to_install[@]}")

else
    echo "Unsupported OS or version" && exit 1
fi

Repos can be added conditionally for all OSes, so if the package is not required then the repo is not installed:

    case " ${rpm_packages_to_install[*]} " in
    *' code '*)
        rpm --import https://packages.microsoft.com/keys/microsoft.asc
        sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
        ;;&
    *' lazygit '*)
        dnf -y copr enable atim/lazygit
        ;;&
    *' gh '*)
        dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
        ;;
    esac

Run the scripts

sudo ./install.sh
./install-binaries.bash
./setup.sh

ENJOY!

Neovim keybindings and plugins used

Neovim custom key mappings

General                                     LSP
-------                                     ---
         jk = escape                        gD        = jumps to the declaration
     ctrl-s = save                          gd        = jumps to the definition
alt h/j/k/l = navigate windows              K         = displays hover information
                                            ctrl-k    = displays signature info
<leader>ts = open terminal below            gi        = lists all implementations
<leader>tv = open terminal to the right                 in the quickfix window
                                            gr        = list all symbol references
<leader>cd = working dir to current file    <space>wa = add workspace folder
<leader>qa = quit all                       <space>wr = remove workstation folder
<leader>cc = toggle colorcolumn             <space>wl = list workstation folders
<leader>n  = toggle line numbers            <space>D  = jump to type definition
<leader>w  = toggle whitespaces             <space>f  = format
<leader>z  = toggle zen mode                <space>rn = rename all symbol references
                                            <space>ca = selects a code action
                                            <space>e  = show diagnostics from line
                                            <space>q  = sets the location list
                                            [d        = move to previous diagnostic
                                            ]d        = move to next diagnostic


fzf.vim                                     Tree-sitter
-------                                     -----------
ctrl-p     = open file explorer             <CR>    = Initilize selection
<leader>b  = open buffers                   <CR>    = Expand selection by scope
<leader>h  = open file history              <TAB>   = Expand selection by node
<leader>rg = ripgrep search results         <S-TAB> = Shrink selection by node
<leader>gs = git status
<leader>gh = git commits history
ctrl-/     = toggle preview window
ctrl-t/x/v = open in new tab/split/vert split


trouble.nvim                                vim-commentary
------------                                --------------
<leader>xx = toggle                         gcc = comment out a line (takes a count)
<leader>xw = toggle workspace diagnostics   gc  = comment out the target of a motion,
<leader>xd = toggle document diagnostics          or the selection in visual mode
<leader>xq = toggle quickfix
<leader>xl = toggle loclist
        gR = toggle lsp references

For all the Vim/Neovim built in shortcuts please check out https://www.elsewebdevelopment.com/ultimate-vim-keyboard-shortcuts/

Neovim plugins

This is a list of all the plugins used, please follow the links to read about how to operate them.

  • nvim-treesitter - Nvim Treesitter configurations and abstraction layer

  • nvim-lspconfig - Quickstart configurations for the Nvim LSP client

  • nvim-cmp - Auto completion plugin for nvim written in Lua

  • nvim-lightbulb - Shows a lightbulb whenever a textDocument/codeAction is available at the current cursor position

  • nvim-markdown-preview - Markdown preview in the browser using pandoc/live-server through Neovim's job-control API

  • zen-mode.nvim - Distraction-free coding for Neovim

  • null-ls.nvim - Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua

  • vim-commentary - Comment stuff out

  • fzf.vim - fzf vim wrapper

FAQ

Q: How do I install Visual Studio Code?

A: Simply uncomment code from rpm-packages-to-install in install.sh before you run it.

If you would like to use Code for things that Neovim still struggles with (like debugging), and still use all the Vim keyboard shortcuts, I suggest installing asvetliakov.vscode-neovim and using these settings:

settings.json

{
  // font size
  "editor.fontSize": 15,
  "markdown.preview.fontSize": 15,
  "terminal.integrated.fontSize": 15,
  // asvetliakov.vscode-neovim
  "editor.scrollBeyondLastLine": false,
  "vscode-neovim.neovimExecutablePaths.linux": "/usr/local/bin/nvim", // for RHEL clones, or "/usr/bin/nvim" for Fedora
  "workbench.list.automaticKeyboardNavigation": false,
  // various
  "window.titleBarStyle": "custom", // adjust the appearance of the window title bar for linux
  "editor.minimap.enabled": false, // controls whether the minimap is shown
  "workbench.activityBar.visible": false, // controls the visibility of the activity bar in the workbench
  "window.menuBarVisibility": "hidden", // control the visibility of the menu bar
  "files.restoreUndoStack": false, // don't restore the undo stack when a file is reopened
  "editor.dragAndDrop": false, // controls whether the editor should allow moving selections via drag and drop
  "telemetry.enableTelemetry": false // disable diagnostic data collection
}

You might also like to install ms-vscode.live-server for live debugging in Code or the browser.

Q: Why is the script spit into multiple parts for install and setup?

A: Sudo privileges are needed for the installation, and they time out before the script can finish. This makes unattended installation impossible without running the installer as root.

The setup part is much easier to do as a user, so running it as the user avoids constant su - "$SUDO_USER" -c statements in the code. If a part of the setup needs sudo it will ask for your password.

Q: Does this script disable the caps lock key? I've noticed that it works during login but after that it stops working altogether.

A: It makes the caps lock into delete for touch typing purposes, to change it modify this line in the setup script:

 capslock_delete="false"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].