diff --git a/README.md b/README.md index a723824..c56d4c0 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,11 @@ This repo contains scripts to install a full Archlinux with Xfce install complet - node & npm - neovim & nano -# IMPORTANT: PLEASE ONLY INSTALL ON A VM OR ON A DEVICE WITH NO ADDITIONAL DATA ON IT YOU'D LIKE TO KEEP \ No newline at end of file +# IMPORTANT: PLEASE ONLY INSTALL ON A VM OR ON A DEVICE WITH NO ADDITIONAL DATA ON IT YOU'D LIKE TO KEEP + + +# Running +On a live-booted archlinux installer, run the following commands: + + +## Editing the sudoers file diff --git a/config/VSCodium/User/keybindings.json b/config/VSCodium/User/keybindings.json new file mode 100644 index 0000000..23ca3db --- /dev/null +++ b/config/VSCodium/User/keybindings.json @@ -0,0 +1 @@ +// Empty \ No newline at end of file diff --git a/config/VSCodium/User/settings.json b/config/VSCodium/User/settings.json new file mode 100644 index 0000000..4c0ab61 --- /dev/null +++ b/config/VSCodium/User/settings.json @@ -0,0 +1,27 @@ +{ + "diffEditor.ignoreTrimWhitespace": false, + "explorer.confirmDragAndDrop": false, + "git.autofetch": true, + "workbench.preferredHighContrastColorTheme": "Material Theme Darker High Contrast", + "workbench.colorTheme": "Material Theme Darker High Contrast", + "git.enableSmartCommit": true, + "latex-utilities.countWord.format": "${wordsBody} Words", + "editor.fontFamily": "'Source Code Pro'", + "gitMerger.customCommitMessage": true, + "[python]": { + "editor.formatOnType": true + }, + "update.mode": "none", + "workbench.enableExperiments": false, + "workbench.startupEditor": "none", + "workbench.iconTheme": "eq-material-theme-icons-darker", + "ltex.language": "en-GB", + "[tex]": { + "editor.wordWrap": "bounded", + "editor.wordWrapColumn": 200 + }, + "[latex]": { + "editor.wordWrap": "bounded", + "editor.wordWrapColumn": 200 + } +} \ No newline at end of file diff --git a/config/VSCodium/product.json b/config/VSCodium/product.json new file mode 100644 index 0000000..ba7257d --- /dev/null +++ b/config/VSCodium/product.json @@ -0,0 +1,8 @@ +{ + "extensionsGallery": { + "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", + "itemUrl": "https://marketplace.visualstudio.com/items", + "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index", + "controlUrl": "" + } +} diff --git a/config/fish/config.fish b/config/fish/config.fish new file mode 100644 index 0000000..20ae251 --- /dev/null +++ b/config/fish/config.fish @@ -0,0 +1,90 @@ +alias ls='ls -l --color' +alias ll='ls -la --color' + +if status is-interactive + function fish_prompt + + # Cache exit status + set -l last_status $status + + # Set color for variables in prompt + set -l normal (set_color normal) + set -l white (set_color FFFFFF) + set -l turquoise (set_color 5fdfff) + set -l orange (set_color df5f00) + set -l hotpink (set_color df005f) + set -l blue (set_color blue) + set -l limegreen (set_color 87ff00) + set -l purple (set_color af5fff) + set -l red (set_color e70e0e) + + # Configure __fish_git_prompt + set -g __fish_git_prompt_char_stateseparator ' ' + set -g __fish_git_prompt_color 5fdfff + set -g __fish_git_prompt_color_flags df5f00 + set -g __fish_git_prompt_color_prefix white + set -g __fish_git_prompt_color_suffix white + set -g __fish_git_prompt_showdirtystate true + set -g __fish_git_prompt_showuntrackedfiles true + set -g __fish_git_prompt_showstashstate true + + # FIXME: below var causes rendering issues with fish v3.2.0 + set -g __fish_git_prompt_show_informative_status true + + + # Only calculate once, to save a few CPU cycles when displaying the prompt + if not set -q __fish_prompt_hostname + # set -g __fish_prompt_hostname (hostname|cut -d . -f 1) + set -g __fish_prompt_hostname $orange(prompt_hostname)(set_color normal) + end + if not set -q __fish_prompt_char + if [ (id -u) -eq 0 ] + set -g __fish_prompt_char (set_color red)'λ'(set_color normal) + else + set -g __fish_prompt_char 'λ' + end + end + + # change `at` to `ssh` when an interactive ssh session is present + if [ "$SSH_TTY" = "" ] + set -g location at + # set -g __fish_prompt_hostname (set_color orange)(hostname|cut -d . -f 1) + else # connected via ssh + if [ "$TERM" = "xterm-256color-italic" -o "$TERM" = "tmux-256color" ] + set -g location (echo -e "\e[3mssh\e[23m") + # set -g ssh_hostname (echo -e $blue$__fish_prompt_hostname) + set -g __fish_prompt_hostname $blue(prompt_hostname)(set_color normal) + else + set -g location ssh + # set -g ssh_hostname (echo -e $blue$__fish_prompt_hostname) + set -g __fish_prompt_hostname $blue(prompt_hostname)(set_color normal) + end + end + + if [ (id -u) -eq 0 ] + # top line > Superuser + echo -n $red'╭─'$hotpink$USER $white$location $__fish_prompt_hostname$white' in '$limegreen(pwd)$turquoise + __fish_git_prompt " (%s)" + echo + # bottom line > Superuser + echo -n $red'╰' + echo -n $red'─'$__fish_prompt_char $normal + else # top line > non superuser's + echo -n $white'╭─'$hotpink$USER $white$location $__fish_prompt_hostname$white' in '$limegreen(pwd)$turquoise + __fish_git_prompt " (%s)" + echo + # bottom line > non superuser's + echo -n $white'╰' + echo -n $white'─'$__fish_prompt_char $normal + end + + # NOTE: disable `VIRTUAL_ENV_DISABLE_PROMPT` in `config.fish` + # see: https://virtualenv.pypa.io/en/latest/reference/#envvar-VIRTUAL_ENV_DISABLE_PROMPT + # support for virtual env name + if set -q VIRTUAL_ENV + echo -n "($turquoise"(basename "$VIRTUAL_ENV")"$white)" + end +end + + +end diff --git a/config/fish/fish_variables b/config/fish/fish_variables new file mode 100644 index 0000000..71bee0c --- /dev/null +++ b/config/fish/fish_variables @@ -0,0 +1,33 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3400 +SETUVAR fish_color_autosuggestion:555\x1ebrblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:blue +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_greeting:\x1d +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr +SETUVAR fish_user_paths:/usr/lib/python3\x2e11/site\x2dpackages\x1e/usr/lib/python3\x2e11\x1e/usr/lib/python3\x2e11/site\x2dpackages/\x1e/home/janis/\x2elocal/lib/python3\x2e11/site\x2dpackages/\x1e/home/janis/\x2elocal/lib/python3\x2e11/ diff --git a/install.sh b/install.sh index 184bdcf..7a6f7a5 100755 --- a/install.sh +++ b/install.sh @@ -74,7 +74,7 @@ mount "/dev/${driveName}2" /mnt mkdir /mnt/boot mount "/dev/${driveName}1" /mnt/boot -pacstrap -K /mnt base linux-zen linux-firmware nano networkmanager efibootgmr grub man python-pip git npm node xfce4 +pacstrap -K /mnt base linux-zen linux-firmware nano networkmanager efibootgmr grub man python-pip git npm node xfce4 base-devel gcc fish sudo gdm plymouth echo " @@ -122,6 +122,7 @@ echo " sleep 2 mkinitcpio -P +plymouth-set-default-theme -R script cd /tmp git clone https://aur.archlinux.org/yay.git @@ -129,4 +130,95 @@ cd yay makepkg -si grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ARCH -grub-mkconfig -o /boot/grub/grub.cfg \ No newline at end of file +grub-mkconfig -o /boot/grub/grub.cfg + + + +yay -Syu --noconfirm vscodium + +echo " + +==> Creating new user, please choose a password once prompted! + +" + +read -p "Choose a password: " pwd + +useradd -m arch-is-the-best +echo "$pwd" | passwd arch-is-the-best --stdin +usermod -aG wheel arch-is-the-best + +echo " + +==> New user created! Please enter the password for the new user to switch to it +to finish up setup + +" + +mv /root/arch-dev-vm/ /home/arch-is-best +chmod 777 /home/arch-is-best/vscode-extensions + +su arch-is-best + + +echo " + +==> Setup complete, adding config files to new user plus some other config + +" + +mkdir /home/arch-is-best/.config + +mv /home/arch-is-best/arch-dev-vm/config/* /home/arch-is-best/.config + +file="/home/arch-is-best/vscode-extensions" +while read line; do + vscodium --install-extension "${line}" +done < "${file}" + + +exit + +echo " + +==> All config completed. + + +Now it is time to edit the sudoers file. What you need to do is the following +(also explained in my blogpost and the README): + +Scroll down to the section towards the very bottom where it says the following: +\"## Uncomment to allow members of group wheel to execute any command\" + +Remove the # in the subsequent line and hit Ctrl + S, then Ctrl + X. + +This is on line 15 from the bottom usually. + +Now, once you are ready, press enter to open the file + +" + +visudo + + +echo " + + + + + + + ___ _ ___ __ __ __ __ +/ \ _ _ __ | |_ | \ ___ __ __ \ \ / /| \/ | +| - || '_|/ _|| \ | |) |/ -_)\ V / \ / | |\/| | +|_|_||_| \__||_||_| |___/ \___| \_/ \_/ |_| |_| + + +---------------------------------------------------------------- + +DONE! +Congratulations, you now have a fully set up linux VM. + +" + +sleep 2 \ No newline at end of file diff --git a/mkinitcpio.conf b/mkinitcpio.conf new file mode 100644 index 0000000..2fd80a4 --- /dev/null +++ b/mkinitcpio.conf @@ -0,0 +1,73 @@ +# vim:set ft=sh +# MODULES +# The following modules are loaded before any boot hooks are +# run. Advanced users may wish to specify all system modules +# in this array. For instance: +# MODULES=(usbhid xhci_hcd) +MODULES=() + +# BINARIES +# This setting includes any additional binaries a given user may +# wish into the CPIO image. This is run last, so it may be used to +# override the actual binaries included by a given hook +# BINARIES are dependency parsed, so you may safely ignore libraries +BINARIES=() + +# FILES +# This setting is similar to BINARIES above, however, files are added +# as-is and are not parsed in any way. This is useful for config files. +FILES=() + +# HOOKS +# This is the most important setting in this file. The HOOKS control the +# modules and scripts added to the image, and what happens at boot time. +# Order is important, and it is recommended that you do not change the +# order in which HOOKS are added. Run 'mkinitcpio -H ' for +# help on a given hook. +# 'base' is _required_ unless you know precisely what you are doing. +# 'udev' is _required_ in order to automatically load modules +# 'filesystems' is _required_ unless you specify your fs modules in MODULES +# Examples: +## This setup specifies all modules in the MODULES setting above. +## No RAID, lvm2, or encrypted root is needed. +# HOOKS=(base) +# +## This setup will autodetect all modules for your system and should +## work as a sane default +# HOOKS=(base udev autodetect modconf block filesystems fsck) +# +## This setup will generate a 'full' image which supports most systems. +## No autodetection is done. +# HOOKS=(base udev modconf block filesystems fsck) +# +## This setup assembles a mdadm array with an encrypted root file system. +## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices. +# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck) +# +## This setup loads an lvm2 volume group. +# HOOKS=(base udev modconf block lvm2 filesystems fsck) +# +## NOTE: If you have /usr on a separate partition, you MUST include the +# usr and fsck hooks. +HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck plymouth) + +# COMPRESSION +# Use this to compress the initramfs image. By default, zstd compression +# is used. Use 'cat' to create an uncompressed image. +#COMPRESSION="zstd" +#COMPRESSION="gzip" +#COMPRESSION="bzip2" +#COMPRESSION="lzma" +#COMPRESSION="xz" +#COMPRESSION="lzop" +#COMPRESSION="lz4" + +# COMPRESSION_OPTIONS +# Additional options for the compressor +#COMPRESSION_OPTIONS=() + +# MODULES_DECOMPRESS +# Decompress kernel modules during initramfs creation. +# Enable to speedup boot process, disable to save RAM +# during early userspace. Switch (yes/no). +#MODULES_DECOMPRESS="yes" diff --git a/pacman.conf b/pacman.conf new file mode 100644 index 0000000..f841450 --- /dev/null +++ b/pacman.conf @@ -0,0 +1,101 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +#CacheDir = /var/cache/pacman/pkg/ +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +#HookDir = /etc/pacman.d/hooks/ +HoldPkg = pacman glibc +#XferCommand = /usr/bin/curl -L -C - -f -o %o %u +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +Architecture = auto +ILoveCandy + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +Color +#NoProgressBar +CheckSpace +#VerbosePkgLists +#ParallelDownloads = 5 + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional +#RemoteFileSigLevel = Required + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + +#[testing] +#Include = /etc/pacman.d/mirrorlist + +[core] +Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +#[extra-testing] +#Include = /etc/pacman.d/mirrorlist + +# If you want to run 32 bit applications on your x86_64 system, +# enable the multilib repositories as required here. + +#[multilib-testing] +#Include = /etc/pacman.d/mirrorlist + +[multilib] +Include = /etc/pacman.d/mirrorlist + +[arch4edu] +Server = https://de.arch4edu.mirror.kescher.at/$arch + +# An example of a custom package repository. See the pacman manpage for +# tips on creating your own repositories. +#[custom] +#SigLevel = Optional TrustAll +#Server = file:///home/custompkgs diff --git a/vscode-extensions b/vscode-extensions new file mode 100644 index 0000000..0982eda --- /dev/null +++ b/vscode-extensions @@ -0,0 +1,18 @@ +abusaidm.html-snippets +bungcip.better-toml +dbaeumer.vscode-eslint +donjayamanne.jquerysnippets +ecmel.vscode-html-css +Equinusocio.vsc-material-theme +equinusocio.vsc-material-theme-icons +James-Yu.latex-workshop +mads-hartmann.bash-ide-vscode +mathematic.vscode-latex +mechatroner.rainbow-csv +ms-python.python +ms-vscode.cpptools +streetsidesoftware.code-spell-checker +tecosaur.latex-utilities +valentjn.vscode-ltex +wayou.vscode-todo-highlight +Yongke.latex-wordcount