feat(install): Script to automate application installation

- Install all required applications to setup a personal
machine with just a single command
- TODO: Some applications, available only with ppa aren't yet configured
  to be installed. Next time.
This commit is contained in:
Pratik Tripathy
2024-09-09 18:06:08 +05:30
parent df9c12edee
commit 7afa1d47bf
12 changed files with 261 additions and 2 deletions

106
.dockerignore Normal file
View File

@@ -0,0 +1,106 @@
# ---- KDE Neon ----
# KDE directory preferences
.directory
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# ---- macOS ----
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# ---- IDE ----
# Vim Artifacts
**.swp
lazy-lock.json
.luarc.json
# VS Code Artifacts
/.vscode/
**state.vscdb
**state.vscdb.backup
.vscode/extensions/** # Ignore all Files under .vscode/extensions/
!.vscode/extensions/**/*.json # Only json files inside the .vscode/extensions/ folder
# Intellij IDE Artifacts
.idea/
*.imi
*.jar
*.tar
resharper-host/
tasks/
# ---- Programming Languages ----
# Ignore all downloaded node modules
node_modules/*
dist
dist-ssr
*.local
# Ignore all minified js files
*.min.js
# Log files
..logs/
*.log
# Other Files to ignore
**app_stat_v2.db
.ssh/*.pub
**/Package Control.cache
**Cache
*.db
*.qmlc
*.qml
*.jsc
**/contents/images
**/contents/fonts
*kpluginindex.json
*backup
*undo
*sessions
*.bak
nvim_switch/
*kitty/*.py
README.md
.gitignore
.prettierrc
LICENSE

1
.gitignore vendored
View File

@@ -50,7 +50,6 @@ Temporary Items
# Vim Artifacts
**.swp
lazy-lock.json
.luarc.json
# VS Code Artifacts
/.vscode/

5
.luarc.json Normal file
View File

@@ -0,0 +1,5 @@
{
"diagnostics.globals": [
"vim"
]
}

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
#FROM kdeneon/plasma
FROM debian:11-slim
#FROM debian:12-slim
#FROM ubuntu:20.04
#FROM ubuntu:22.04
#FROM ubuntu:22.10
#FROM ubuntu:23.04
#TODO: Fedora
#TODO: openSUSE
#TODO: Arch
WORKDIR /scripts
RUN apt-get update -y && apt-get install sudo -y
COPY scripts .
CMD [ "bash", "install.sh" ]

View File

@@ -1,6 +1,6 @@
# dotfiles
Place to keep my .dotfiles so I do not have to worry about migrating to another system.
Place to keep my .dotfiles, so I do not have to worry about migrating to another system.
## Usage

View File

@@ -0,0 +1 @@
{"name":"Default","extensions":"[{\"identifier\":{\"id\":\"aaron-bond.better-comments\",\"uuid\":\"7a0110bb-231a-4598-aa1b-0769ea46d28b\"},\"displayName\":\"Better Comments\"},{\"identifier\":{\"id\":\"alefragnani.project-manager\",\"uuid\":\"1b747f06-3789-4ebd-ac99-f1fe430c3347\"},\"displayName\":\"Project Manager\"},{\"identifier\":{\"id\":\"alexcvzz.vscode-sqlite\",\"uuid\":\"eaee103c-e866-4b73-87f8-3749cab64da2\"},\"displayName\":\"SQLite\"},{\"identifier\":{\"id\":\"bierner.markdown-preview-github-styles\",\"uuid\":\"5cbdf58a-694a-4aba-af08-61d00842eb03\"},\"displayName\":\"Markdown Preview Github Styling\"},{\"identifier\":{\"id\":\"coolbear.systemd-unit-file\",\"uuid\":\"fe20f03a-2abf-470a-ab23-d671ec38ce42\"},\"displayName\":\"systemd-unit-file\"},{\"identifier\":{\"id\":\"csharpier.csharpier-vscode\",\"uuid\":\"14f1480a-1193-4742-aaee-dd963cc37f0f\"},\"displayName\":\"CSharpier - Code formatter\",\"disabled\":true},{\"identifier\":{\"id\":\"davidanson.vscode-markdownlint\",\"uuid\":\"daf8b44d-8aae-4da2-80c5-1f770219f643\"},\"displayName\":\"markdownlint\"},{\"identifier\":{\"id\":\"eamodio.gitlens\",\"uuid\":\"4de763bd-505d-4978-9575-2b7696ecf94e\"},\"displayName\":\"GitLens — Git supercharged\",\"disabled\":true},{\"identifier\":{\"id\":\"esbenp.prettier-vscode\",\"uuid\":\"96fa4707-6983-4489-b7c5-d5ffdfdcce90\"},\"displayName\":\"Prettier - Code formatter\"},{\"identifier\":{\"id\":\"foam.foam-vscode\",\"uuid\":\"b85c6625-454b-4b61-8a22-c42f3d0f2e1e\"},\"displayName\":\"Foam\"},{\"identifier\":{\"id\":\"github.github-vscode-theme\",\"uuid\":\"7328a705-91fc-49e6-8293-da6f112e482d\"},\"displayName\":\"GitHub Theme\"},{\"identifier\":{\"id\":\"gruntfuggly.todo-tree\",\"uuid\":\"261cac81-cd7b-4555-bb41-0c2d2bcd3e70\"},\"displayName\":\"Todo Tree\"},{\"identifier\":{\"id\":\"humao.rest-client\",\"uuid\":\"dda49fd5-1f3b-4d25-bf61-4fc41905ede5\"},\"displayName\":\"REST Client\"},{\"identifier\":{\"id\":\"mhutchie.git-graph\",\"uuid\":\"438221f8-1107-4ccd-a6fe-f3b7fe0856b7\"},\"displayName\":\"Git Graph\"},{\"identifier\":{\"id\":\"ms-azuretools.vscode-docker\",\"uuid\":\"0479fc1c-3d67-49f9-b087-fb9069afe48f\"},\"displayName\":\"Docker\"},{\"identifier\":{\"id\":\"ms-dotnettools.csdevkit\",\"uuid\":\"7ad42776-8f7e-4214-bf67-4f0b518ef629\"},\"displayName\":\"C# Dev Kit\",\"disabled\":true},{\"identifier\":{\"id\":\"ms-dotnettools.csharp\",\"uuid\":\"d0bfc4ab-1d3a-4487-8782-7cf6027b4fff\"},\"displayName\":\"C#\",\"disabled\":true},{\"identifier\":{\"id\":\"ms-dotnettools.vscode-dotnet-runtime\",\"uuid\":\"1aab81a1-b3d9-4aef-976b-577d5d90fe3f\"},\"displayName\":\".NET Install Tool\",\"disabled\":true},{\"identifier\":{\"id\":\"ms-dotnettools.vscodeintellicode-csharp\",\"uuid\":\"13fef117-0575-4dc5-b573-5cb945a69d0a\"},\"displayName\":\"IntelliCode for C# Dev Kit\",\"disabled\":true},{\"identifier\":{\"id\":\"ms-vscode-remote.remote-containers\",\"uuid\":\"93ce222b-5f6f-49b7-9ab1-a0463c6238df\"},\"displayName\":\"Dev Containers\"},{\"identifier\":{\"id\":\"ms-vscode.sublime-keybindings\",\"uuid\":\"529697b9-b343-4b1c-ba2f-f5ef692132d4\"},\"displayName\":\"Sublime Text Keymap and Settings Importer\"},{\"identifier\":{\"id\":\"patcx.vscode-nuget-gallery\",\"uuid\":\"240db237-62cf-4e62-a359-54756e6b8a08\"},\"displayName\":\"NuGet Gallery\",\"disabled\":true},{\"identifier\":{\"id\":\"pkief.material-icon-theme\",\"uuid\":\"5db78037-f674-459f-a236-db622c427c5b\"},\"displayName\":\"Material Icon Theme\"},{\"identifier\":{\"id\":\"rust-lang.rust-analyzer\",\"uuid\":\"06574cb4-e5dc-4631-8174-a543a4533621\"},\"displayName\":\"rust-analyzer\",\"disabled\":true},{\"identifier\":{\"id\":\"streetsidesoftware.code-spell-checker\",\"uuid\":\"f6dbd813-b0a0-42c1-90ea-10dde9d925a7\"},\"displayName\":\"Code Spell Checker\"},{\"identifier\":{\"id\":\"timonwong.shellcheck\",\"uuid\":\"f95d8fff-f70a-4ae5-bb06-5c47ddbc8fc6\"},\"displayName\":\"ShellCheck\"},{\"identifier\":{\"id\":\"vadimcn.vscode-lldb\",\"uuid\":\"bee31e34-a44b-4a76-9ec2-e9fd1439a0f6\"},\"displayName\":\"CodeLLDB\",\"disabled\":true},{\"identifier\":{\"id\":\"vscodevim.vim\",\"uuid\":\"d96e79c6-8b25-4be3-8545-0e0ecefcae03\"},\"displayName\":\"Vim\"},{\"identifier\":{\"id\":\"wayou.vscode-todo-highlight\",\"uuid\":\"97a08c5f-6667-4242-a5c5-045dfb6bd4b9\"},\"displayName\":\"TODO Highlight\"},{\"identifier\":{\"id\":\"yzhang.markdown-all-in-one\",\"uuid\":\"98790d67-10fa-497c-9113-f6c7489207b2\"},\"displayName\":\"Markdown All in One\"},{\"identifier\":{\"id\":\"zxh404.vscode-proto3\",\"uuid\":\"1d3d1fb2-0d8f-47ed-bfce-990b8ddfc9d8\"},\"displayName\":\"vscode-proto3\",\"disabled\":true}]"}

9
common/.luarc.json Normal file
View File

@@ -0,0 +1,9 @@
{
"diagnostics.globals": [
"vim"
],
"diagnostics.disable": [
"deprecated",
"undefined-doc-name"
]
}

38
scripts/brew-package-list Normal file
View File

@@ -0,0 +1,38 @@
# Lines that start with # are ignored
bat
bats-core
dnscrypt-proxy
docker
docker-compose
fd
font-caskaydia-mono-nerd-font
font-fira-code-nerd-font
font-fira-mono-nerd-font
font-hasklug-nerd-font
font-inconsolata-nerd-font
font-jetbrains-mono-nerd-font
font-liberation-nerd-font
font-symbols-only-nerd-font
fzf
go
jq
lazydocker
lazygit
lua
luajit
lua-language-server
n
neovim
prettierd
python@3.12
rclone
shellcheck
shodan
speedtest-cli
sqlite
tlrc
tokei
tree-sitter
yt-dlp
zsh-autosuggestions
zsh-syntax-highlighting

11
scripts/docker-test.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
# script to build and run docker
main() {
docker container prune -f && echo "Removed old Docker containers"
docker build -f ../Dockerfile -t dotfile-install-test:latest .. && echo "Docker build success"
docker run -it dotfile-install-test:latest
}
main "$@"

33
scripts/install.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env sh
# TODO:
# - Display log or show instruction to see the logs
# - Add logs to a file
# - How to manage/recover from installation issues
# TODO: ppa: brave, vs-code, cursor, kitty, libreoffice, mattermost-desktop, skypedesktop, ulauncher, code, dotnet8, dotnet8-sdk8.0, aspnetcore-runtime-8.0, sublime-text, AppImage Launcher Settings, Jetbrains Toolbox, Obsidian, Postman, firefox, zen, zoho, zoho-workdrive
install_os_packages() {
# Install packages listed on "os-package-list" file
# Ignore lines that start with #
OS_PACKAGES=$(sed "/^#/d" os-package-list | tr "\n\r" " ")
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install $OS_PACKAGES -y
}
install_brew_packages() {
# Install packages listed on "brew-package-list" file
# Ignore lines that start with #
yes | bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> "$HOME"/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew tap homebrew/linux-fonts # Required for nerd fonts
BREW_PACKAGES=$(sed "/^#/d" brew-package-list | tr "\n\r" " ")
brew install $BREW_PACKAGES
}
main() {
install_os_packages
# install_brew_packages
}
main "$@"

43
scripts/os-package-list Normal file
View File

@@ -0,0 +1,43 @@
# Lines that start with # are ignored
# TODO: use apt to check if the package is available. if not, remove them from list before installing
apt-transport-https
bash
bleachbit
build-essential
ca-certificates
clang
curl
evolution-ews
dolphin
dolphin-plugins
ffmpeg
flameshot
gcc
gdb
git
gparted
htop
imagemagick
kde-spectacle
kdeconnect
llvm
make
net-tools
okular
python3
python3-pip
ripgrep
simplescreenrecorder
smplayer
software-properties-common
solaar
syncthing
tmux
ufw
vim
vim-common
vim-tiny
vlc
wget
xclip
zsh