mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-01-23 06:08:35 +01:00
Remove legacy install scripts
This commit is contained in:
parent
48c29c5d7b
commit
4979da6474
@ -1,41 +0,0 @@
|
||||
##################################################################################
|
||||
#
|
||||
# New Start: A modern Arch workflow built with an emphasis on functionality.
|
||||
# Copyright (C) 2017 Donovan Glover
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
##################################################################################
|
||||
|
||||
# Ensure that a <localuser> was given so we can use yay from it
|
||||
if [ -z "$1" ]; then
|
||||
echo "You need to specify a local user to use."
|
||||
echo "Usage: aur.sh <localuser>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Store the local user in a variable so we can use it inside get()
|
||||
LOCALUSER=$1
|
||||
|
||||
# Handle installing packages from the AUR
|
||||
function get() {
|
||||
su $LOCALUSER --session-command "yay -S $1 --noconfirm --noedit"
|
||||
}
|
||||
|
||||
get shotgun # Install shotgun, our screenshot utility of choice
|
||||
get inox-bin # Install inox, our chromium variant of choice
|
||||
get waterfox-bin # Install waterfox, our firefox variant of choice
|
||||
get ttf-noto # Install the noto fonts, used for extended language support
|
||||
get polybar # Install polybar, our panel system of choice
|
||||
get htop-vim-git # Install htop-vim-git, our process explorer of choice
|
@ -1,111 +1,14 @@
|
||||
##################################################################################
|
||||
#
|
||||
# New Start: A modern Arch workflow built with an emphasis on functionality.
|
||||
# Copyright (C) 2017 Donovan Glover
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
##################################################################################
|
||||
|
||||
# NOTE: The following assumptions are made:
|
||||
#
|
||||
# 1. You use the US keyboard layout. (A default in Arch Linux)
|
||||
# 2. Your timezone is Eastern Time. (You can easily change this in the script)
|
||||
# 3. You have secure boot disabled (Secure boot may prevent the computer from booting free software)
|
||||
#
|
||||
# Installation instructions:
|
||||
#
|
||||
# ```
|
||||
# wget https://raw.githubusercontent.com/GloverDonovan/new-start/master/install.sh
|
||||
# chmod +x install.sh
|
||||
# ./install.sh <HOSTNAME> <LOCALUSER>
|
||||
# ```
|
||||
#
|
||||
# Note that the default password for your new account is the same as your username. Upon reboot, the X server should automatically start at login. Then:
|
||||
#
|
||||
# 1. Change the root password with `passwd`
|
||||
# 2. Change the local account password with `passwd <username>`
|
||||
#
|
||||
# That's it! You're now ready to use your shiny new system!
|
||||
|
||||
# Turn error handling on so that any errors terminate the script
|
||||
set -e
|
||||
|
||||
USAGE="Usage: ./install.sh <hostname> <localuser>"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "You need to specify the hostname of your machine.\n$USAGE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
echo "You need to supply a name for the local user.\n$USAGE"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# TODO: Initial installation
|
||||
timedatectl set-ntp true # Attempt to sync with the network time
|
||||
|
||||
parted /dev/sda mklabel msdos # Create a DOS partition table
|
||||
parted /dev/sda mkpart primary ext4 1MiB 14GiB # Create the root partition
|
||||
parted /dev/sda set 1 boot on # Enable boot from the root partition
|
||||
parted /dev/sda mkpart primary linux-swap 14GiB 100% # Create the swap partition
|
||||
|
||||
mkfs -t ext4 /dev/sda1 && mount /dev/sda1 /mnt # Make the filesystem and mount it
|
||||
mkswap /dev/sda2 && swapon /dev/sda2 # Make the swap partition and enable it
|
||||
|
||||
pacstrap /mnt base base-devel # Install Arch on the new filesystem
|
||||
genfstab -U /mnt > /mnt/etc/fstab # Mount the filesystem automatically on boot
|
||||
|
||||
# TODO: Configuring the new system
|
||||
./install/system.sh
|
||||
|
||||
# Configure the hostname
|
||||
echo "$1" > /mnt/etc/hostname
|
||||
echo "127.0.1.1 $1.localdomain $1" >> /mnt/etc/hosts
|
||||
|
||||
# Generate locales for en_US.UTF-8
|
||||
arch-chroot /mnt locale-gen
|
||||
|
||||
arch-chroot /mnt pacman -S grub --noconfirm # Download grub
|
||||
arch-chroot /mnt grub-install /dev/sda # Install it to the root partition
|
||||
|
||||
arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg # Make the configuration file for grub
|
||||
|
||||
arch-chroot /mnt mkinitcpio -p linux # Save our hardware information
|
||||
|
||||
# Edit system configuration files directly
|
||||
arch-chroot /mnt sed -i '/Color/s/^#//g' /etc/pacman.conf # Uncomment the Color line in /etc/pacman.conf (enables colors when using pacman and pacaur)
|
||||
|
||||
arch-chroot /mnt pacman -S zsh grml-zsh-config zsh-syntax-highlighting --noconfirm # Install zsh and sane defaults that make zsh much more pleasant to work with
|
||||
arch-chroot /mnt chsh -s /bin/zsh # Change the root shell to it
|
||||
USAGE="Usage: ./install.sh <hostname> $1 <localuser> $2"
|
||||
|
||||
# ============= We're done configuring, now install our stuff =============
|
||||
arch-chroot /mnt pacman -S vim git tree wget httpie unzip diff-so-fancy ntp --noconfirm # Install de-facto software useful in various instances
|
||||
arch-chroot /mnt pacman -S openvpn openssh --noconfirm # Install openvpn for VPN and openssh for SSH access
|
||||
|
||||
# Create a local user account
|
||||
arch-chroot /mnt useradd -m -g users -G wheel -s /bin/zsh $2
|
||||
|
||||
# Testing here. Make sure that the output above is correct.
|
||||
read -rsp $'Press enter to continue...\n'
|
||||
|
||||
|
||||
# TODO: Install all the things
|
||||
./install/packages.sh
|
||||
|
||||
# TODO: Clean up and final changes for the new system
|
||||
|
||||
# Install all the vim plugins
|
||||
# TODO: Download vim-plug before this so :PlugInstall works
|
||||
@ -120,35 +23,6 @@ mkdir ~/.vim/undo
|
||||
vim +PlugInstall +qall
|
||||
|
||||
# This is a placeholder of the structure needed to install crystal-ctags
|
||||
# TODO: Ensure this works during installation
|
||||
cd some_directory
|
||||
git clone https://github.com/SuperPaintman/crystal-ctags
|
||||
cd crystal-ctags
|
||||
sudo make install # TODO: Is sudo required here?
|
||||
cd ../..
|
||||
rm some_directory
|
||||
|
||||
# Move all the dotfiles and other config files to the right place
|
||||
|
||||
# =================== Give that account a password so it's possible to login to it with a password ===================
|
||||
# Follow the same principle of using permission scope here
|
||||
|
||||
echo "echo $2:$2 | chpasswd" > $TEMP/chpasswd.sh
|
||||
|
||||
arch-chroot /mnt chmod +x $LTEMP/chpasswd.sh
|
||||
arch-chroot /mnt $LTEMP/chpasswd.sh
|
||||
|
||||
# Install ruby gems that you commonly use in development
|
||||
arch-chroot /mnt gem install jekyll maid
|
||||
|
||||
# ======= Clean up and reboot
|
||||
|
||||
rm -rfv $TEMP # Remove the temp directory
|
||||
|
||||
# Delete the NOASSPWD line we added earlier and replace it with a more reasonable one for daily use (password prompt)
|
||||
head -n -1 /mnt/etc/sudoers > /mnt/etc/sudoers.tmp
|
||||
mv /mnt/etc/sudoers.tmp /mnt/etc/sudoers
|
||||
echo "%wheel ALL=(ALL) ALL" >> /mnt/etc/sudoers # Give the wheel group permission to use the sudo and su commands
|
||||
|
||||
umount /mnt # Unmount the filesystem
|
||||
reboot # Restart the system
|
||||
|
@ -1,109 +1,22 @@
|
||||
##################################################################################
|
||||
#
|
||||
# New Start: A modern Arch workflow built with an emphasis on functionality.
|
||||
# Copyright (C) 2017 Donovan Glover
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
##################################################################################
|
||||
|
||||
alias i="pacman --noconfirm -S"
|
||||
|
||||
i zsh # Install zsh, our shell of choice
|
||||
i grml-zsh-config # Install grml, sane defaults to make zsh more functional
|
||||
i zsh-syntax-highlighting # Install syntax highlighting for colorful shell commands
|
||||
|
||||
i vim # Install vim, our text editor of choice
|
||||
i git # Install git, our version control system of choice
|
||||
i wget # Install wget, used for downloading files from websites
|
||||
i httpie # Install httpie, used to manipulate HTTP requests
|
||||
i diff-so-fancy # Install diff-so-fancy, a nicer git diff
|
||||
i ntp # Install ntp, used to sync the system time with one on the internet
|
||||
|
||||
i zip # Install zip, used to zip files
|
||||
i unzip # Install unzip, used to unzip files
|
||||
i p7zip # Install p7zip, used to extract 7z files
|
||||
i unrar # Install unrar, used to extract rar files
|
||||
|
||||
i openvpn # Install openvpn, used to connect to VPNs
|
||||
i openssh # Install openssh, used to connect via SSH
|
||||
|
||||
i elixir # Install elixir, our functional language of choice
|
||||
i ruby # Install ruby, another programming language of choice
|
||||
i rust # Install rust, a dependency to build other packages
|
||||
i go # Install go, another dependency to build other packages
|
||||
i php # Install php, used when we need to test php stuff
|
||||
i php-cgi # Install php-cgi, used to make php work with local servers
|
||||
i lua # Install lua, in case we ever want to use it
|
||||
i jdk-9-openjdk # Install java, if for some reason we need to use it
|
||||
i crystal # Install crystal, a ruby-like language with a binary compiler
|
||||
i nodejs # Install node.js, used as a javascript runtime environment
|
||||
|
||||
i jq # Install jq, used to manipulate JSON in the terminal
|
||||
i fzf # Install fzf, used to easily search for things in vim
|
||||
i pygmentize # Install pygmentize, used as a variant of cat with syntax highlighting
|
||||
i firejail # Install firejail, a simple and straightforward way to sandbox programs
|
||||
i ctags # Install ctags, used with vim to create tags for formal languages
|
||||
i shards # Install shards, a package manager for crystal
|
||||
i npm # Install npm, a package manager for node.js
|
||||
i llvm # Install llvm, used to make the crystal binary
|
||||
i fd-rs # Install fd-rs, a faster alternative to find
|
||||
i exa # Install exa, a drop-in replacement for ls (and tree)
|
||||
|
||||
i fdupes # Install fdupes, used to quickly find duplicate files
|
||||
i ripgrep # Install rg, a faster alternative to ag / ack / grep
|
||||
|
||||
i tig # Install tig, used to browse git commits
|
||||
i ncdu # Install ncdu, used to easily see disk usage
|
||||
i w3m # Install w3m, our text-based web browser of choice
|
||||
i irssi # Install irssi, our IRC client of choice
|
||||
i profanity # Install profanity, our XMPP client of choice
|
||||
i ispell # Install ispell, used to spell check files
|
||||
i xcape # Install xcape, used to make the caps lock key function as ctrl and esc
|
||||
i borg # Install borg, used to backup directories
|
||||
|
||||
i virtualbox-guest-modules-arch # Install Arch-specific VirtualBox modules
|
||||
i virtualbox-guest-utils # Install the core VirtualBox functionality
|
||||
|
||||
i xorg-server # Install xorg-server, used to manage graphical elements on the display
|
||||
i xorg-xinit # Install xorg-xinit, allowing us to start the X server with .xinitrc
|
||||
i xclip # Install xclip, our clipboard manager of choice
|
||||
i xdo # Install xdo, used to show and hide windows such as polybar
|
||||
i xdotool # Install xdotool, used to make forward search work with zathura and vimtex
|
||||
i xorg-xprop # Install xorg-xprop, used to determine whether or not a window is visible
|
||||
|
||||
i libmad # Install libmad, needed so that we can recognize and process mp3 files
|
||||
i alsa-utils # Install alsa-utils, required to make the sound system work
|
||||
i bspwm # Install bspwm, our window manager of choice
|
||||
i sxhkd # Install sxhkd, used for adding keybindings to X
|
||||
|
||||
i rxvt-unicode # Install urxvt, our terminal of choice
|
||||
i compton # Install compton, our compositor of choice
|
||||
|
||||
i ranger # Install ranger, our file explorer of choice
|
||||
i feh # Install feh, a quick and simple way to view images
|
||||
i mpv # Install mpv, a no-bloat content-first video player
|
||||
i mpd # Install mpd, our music player daemon of choice
|
||||
i mpc # Install mpc, used to control mpd with shell commands
|
||||
i ncmpcpp # Install ncmpcpp, our music player client of choice
|
||||
|
||||
i mps-youtube # Install mps-youtube, allowing us to use youtube straight from the terminal
|
||||
i youtube-dl # Install youtube-dl, a straightforward way to download youtube videos
|
||||
|
||||
i zathura # Install zathura, our document viewer of choice
|
||||
i zathura-djvu # Install zathura-djvu, enabling djvu support for zathura
|
||||
i zathura-pdf-mupdf # Install zathura-pdf-mupdf, enabling pdf support for zathura
|
||||
|
||||
i texlive-core # Install texlive-core, the basic functionality required for TeX and LaTeX
|
||||
i texlive-science # Install texlive-science, allowing us to easily use mathematics with TeX
|
||||
@ -116,7 +29,3 @@ i texlive-formatsextra # Install texlive-formatsextra, additional support for T
|
||||
i texlive-bibtexextra # Install texlive-bibtexextra, more features for BibTeX
|
||||
|
||||
i minted # Install minted, used for syntax highlighting in LaTeX
|
||||
|
||||
i ttf-hack # Install Hack, our primary terminal font of choice
|
||||
i ttf-fira-mono # Install Fira Mono, our secondary terminal font of choice
|
||||
i noto-fonts # Install the Noto fonts, used for everything else
|
||||
|
@ -1,69 +0,0 @@
|
||||
##################################################################################
|
||||
#
|
||||
# New Start: A modern Arch workflow built with an emphasis on functionality.
|
||||
# Copyright (C) 2017 Donovan Glover
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
##################################################################################
|
||||
|
||||
#########################################################################
|
||||
# Language settings: used for localization, etc.
|
||||
#########################################################################
|
||||
|
||||
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen # Use the en_US.UTF-8 locale
|
||||
echo "KEYMAP=us" > /etc/vconsole.conf # Explicitly set the keymap to US
|
||||
echo "LANG=en_US.UTF-8" > /etc/locale.conf # Set the language to en_US.UTF-8
|
||||
|
||||
#########################################################################
|
||||
# Systemd settings: changes how the core system works
|
||||
#########################################################################
|
||||
|
||||
SYSTEMD="/etc/systemd/system.conf"
|
||||
|
||||
# Change the wait time from 90s to 10s, preventing the system from hanging at shutdown
|
||||
echo "DefaultTimeoutStartSec=10s" >> $SYSTEMD
|
||||
echo "DefaultTimeoutStopSec=10s" >> $SYSTEMD
|
||||
|
||||
#########################################################################
|
||||
# Pacman settings: used by pacman and pacaur
|
||||
#########################################################################
|
||||
|
||||
PACMAN="/etc/pacman.conf"
|
||||
|
||||
# Enable colors in pacman by uncommenting the Color line
|
||||
sed -i '/Color/s/^#//g' $PACMAN
|
||||
|
||||
#########################################################################
|
||||
# Global font settings: we have to soft link the settings we want here
|
||||
#########################################################################
|
||||
|
||||
FONTS="/etc/fonts"
|
||||
|
||||
# Disable embedded bitmaps for all fonts
|
||||
ln -s $FONTS/conf.avail/70-no-bitmaps.conf $FONTS/conf.d
|
||||
|
||||
# Enable sub-pixel RGB rendering
|
||||
ln -s $FONTS/conf.avail/10-sub-pixel-rgb.conf $FONTS/conf.d
|
||||
|
||||
# Enable the LCD filter (reduces color fringing)
|
||||
ln -s $FONTS/conf.avail/11-lcdfilter-default.conf $FONTS/conf.d
|
||||
|
||||
#########################################################################
|
||||
# Sudo settings: allows us to use su without prompting for a password
|
||||
# Particularly useful when installing cower and pacaur, etc.
|
||||
#########################################################################
|
||||
|
||||
# Note that this setting gets changed in the clean up stage of the build process
|
||||
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
@ -1,60 +0,0 @@
|
||||
##################################################################################
|
||||
#
|
||||
# New Start: A modern Arch workflow built with an emphasis on functionality.
|
||||
# Copyright (C) 2017 Donovan Glover
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
##################################################################################
|
||||
|
||||
# Ensure that a <localuser> was given so we can run commands from it
|
||||
if [ -z "$1" ]; then
|
||||
echo "You need to specify a local user to use."
|
||||
echo "Usage: yay.sh <localuser>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Store the local user in a variable so we can use it inside of functions
|
||||
LOCALUSER=$1
|
||||
|
||||
# Keep track of the temp directory we use to install the packages
|
||||
TEMP="/home/$LOCALUSER/temp"
|
||||
|
||||
# Build and install packages manually
|
||||
function build() {
|
||||
|
||||
cd $TEMP # Move into the temp directory
|
||||
|
||||
# Clone as the root user since the local user can't
|
||||
git clone https://aur.archlinux.org/$1.git
|
||||
|
||||
# Give the local user permission to use the new folder from git
|
||||
chmod -R a+rwX $1/
|
||||
|
||||
cd $1/ # Move into the new folder
|
||||
|
||||
# Explicitly tell makepkg where to store files
|
||||
export BUILDDIR="$TEMP/$1"
|
||||
|
||||
# Make the package as the local user since the root user can't
|
||||
su $LOCALUSER --session-command 'makepkg -si --noconfirm'
|
||||
|
||||
# Finally install the package as root since the local user can't
|
||||
pacman -U $TEMP/$1/*.pkg.tar.xz --noconfirm
|
||||
|
||||
}
|
||||
|
||||
mkdir -v $TEMP # Make the temp directory
|
||||
build yay # Install yay, our AUR helper of choice
|
||||
rm -rfv $TEMP # Clean up
|
Loading…
Reference in New Issue
Block a user