Mess around with installing as user. Not working...

master
Nathan Steel 5 years ago
parent 4be9692992
commit 72dea6040a

@ -2,6 +2,7 @@
# ideally a minimal install # ideally a minimal install
# Ask what wants to be installed, then if statement each section. Test. # Ask what wants to be installed, then if statement each section. Test.
# Basic, GUI,
# Install X and sudo so other things can work # Install X and sudo so other things can work
apt install sudo xorg build-essential -y apt install sudo xorg build-essential -y
@ -13,18 +14,20 @@ apt update && upgrade -y
adduser nathan sudo adduser nathan sudo
# Terminal shit # Terminal shit
apt install git zsh tmux vim neofetch wget -y apt install git zsh tmux vim neofetch wget curl -y
# Image viewer, music player, rss feed, etc # Music player, rss feed
apt install cmus newsboat youtube-dl mpv scrot -y apt install cmus mpd mpc ncmpcpp newsboat -y
# Video player and youtube-dl
apt install mpv youtube-dl -y
# Screencap and screenshots
apt install ffmpeg scrot -y
# Image viewer, PDF Reader (GUI) # Image viewer, PDF Reader (GUI)
apt install feh zathura -y apt install feh zathura -y
# Xanmod Kernel
echo 'deb http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list && wget -qO - https://dl.xanmod.org/gpg.key | sudo apt-key add -
apt update && apt install linux-xanmod -y
# Network Tools # Network Tools
#apt install net-tools wicd -y #apt install net-tools wicd -y
@ -37,8 +40,12 @@ apt install pavucontrol -y
# Random shit # Random shit
apt install gtypist -y apt install gtypist -y
# Suckless pre-requisites
apt install libx11-dev libxft-dev libxinerama-dev -y
apt install libx11-xcb-dev libxcb-res0-dev -y
# Torrenting # Torrenting
apt install transmission-daemon transmission-cli transmission-remote-cli -y #apt install transmission-daemon transmission-cli transmission-remote-cli -y
#systemctl stop transmission-daemon.service #systemctl stop transmission-daemon.service
#/lib/systemd/system/tranmission-daemon.service # Change debian-transmission to $USER #/lib/systemd/system/tranmission-daemon.service # Change debian-transmission to $USER
@ -48,34 +55,32 @@ apt install transmission-daemon transmission-cli transmission-remote-cli -y
# Setup the user for transmission-daemon # Setup the user for transmission-daemon
# Virtualisation # Virtualisation
apt install qemu-kvm libvirt-clients libvirt-daemon-system virt-manager -y #apt install qemu-kvm libvirt-clients libvirt-daemon-system virt-manager -y
# Add to virtualisation groups # Add to virtualisation groups
adduser nathan libvirt #adduser nathan libvirt
adduser nathan libvirt-qemu #adduser nathan libvirt-qemu
# brave-browser # brave-browser
# https://brave-browser.readthedocs.io/en/latest/installing-brave.html#linux apt install apt-transport-https -y
# Can be built from source, but takes a long while
apt install apt-transport-https
curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add - curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -
echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list
apt update apt update
apt install brave-browser -y apt install brave-browser -y
# Suckless pre-requisites # Xanmod Kernel
apt install libx11-dev libxft-dev libxinerama-dev -y #echo 'deb http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list && wget -qO - https://dl.xanmod.org/gpg.key | sudo apt-key add -
apt install libx11-xcb-dev libxcb-res0-dev -y #apt update && apt install linux-xanmod -y
#####
# Fake user installs # Fake user installs
userinstall() { userdo() {
sudo -H -u nathan bash -c '$1' sudo -H -u nathan bash -c '$1'
} }
# Oh my Zsh
userinstall 'sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"'
# User # User
su nathan #su nathan
HOME=/home/nathan
mkdir2() { mkdir2() {
for DIR for DIR
@ -87,58 +92,65 @@ mkdir2() {
} }
# Create directories # Create directories
mkdir2 ~/downloads/ ~/pictures/ ~/video/ ~/recordings/ ~/documents/ ~/music/ #mkdir2 ~/downloads/ ~/pictures/ ~/video/ ~/recordings/ ~/documents/ ~/music/
#mkdir2 /mnt/usb/ /mnt/hdd/ /mnt/network/ #touch ~/recordings/.recording_status
touch ~/recordings/.recording_status
echo "exec dwm" > $HOME/.xinitrc
# Set location to download source code and other repos # Set location to download source code and other repos
REPO=~/agitrepo REPO=$HOME/agitrepo
mkdir2 $REPO userdo mkdir $REPO
# Suckless installs # Suckless installs
# Not sure how to do the intsall without sudo prompt... # Not sure how to do the intsall without sudo prompt...
# dwm # dwm
git clone https://git.suckless.org/dwm $REPO/adwm userdo 'git clone https://git.suckless.org/dwm $REPO/adwm'
cd ~/agit/adwm/ cd $REPO/adwm/
#sudo make clean install make clean install
# st terminal # st terminal
userdo git clone https://git.suckless.org/st $REPO/ast
cd $REPO/ast/
make clean install
# dmenu launcher # dmenu launcher
userdo git clone https://git.suckless.org/dmenu $REPO/admenu
cd $REPO/admenu/
make clean install
# gruvbox, hotkeys # slstatus
# actualfullscreen, bottomstack, centeredwindowname, fullgaps, swallow userdo git clone https://git.suckless.org/slstatus $REPO/aslstatus
cd $REPO/aslstatus/
make clean install
# Setup the bin directory for custom scripts # Setup the bin directory for custom scripts
mkdir ~/.local/bin userdo mkdir $HOME/.local/bin
# Vi mode terminal and local bin # This also happens in dotfiles, so kinda redundant # Vi mode terminal and local bin # This also happens in dotfiles, so kinda redundant
echo "set -o vi\nexport PATH=~/.local/bin:\$PATH" >> .zshrc echo "set -o vi\nexport PATH=\$HOME/.local/bin:\$PATH" >> .zshrc
echo "export PATH=~/.local/bin/*:\$PATH" >> .zshrc echo "export PATH=\$HOME/.local/bin/*:\$PATH" >> .zshrc
# Add to path for this session # Add to path for this session
export PATH=~/.local/bin/:$PATH export PATH=\$HOME/.local/bin/:$PATH
export PATH=~/.local/bin/*:$PATH export PATH=\$HOME/.local/bin/dmenu:$PATH
# Muh scripties # Muh scripties
cd ~/agit/ userdo git clone https://github.com/aney/scripts $HOME/agit/ascripts/
git clone https://github.com/aney/scripts ~/agit/ascripts/
cd ~/agit/ascripts/
# create a sym link. Will change to cp if others start using my install.sh # create a sym link. Will change to cp if others start using my install.sh
ln -s $(pwd)/dmenu/ ~/.local/bin/ ln -s $REPO/ascripts/dmenu/ $HOME/.local/bin/
ln -s $(pwd)/config/ ~/.local/bin/ ln -s $REPO/ascripts/config/ $HOME/.local/bin/
ln -s $(pwd)/backup/ ~/.local/bin/ ln -s $REPO/ascripts/backup/ $HOME/.local/bin/
# lf file manager # lf file manager
# Download a pre-built binary # Download a pre-built binary
curl -L https://github.com/gokcehan/lf/releases/latest/download/lf-linux-amd64.tar.gz | tar xzC ~/.local/bin userdo curl -L https://github.com/gokcehan/lf/releases/latest/download/lf-linux-amd64.tar.gz | tar xzC ~/.local/bin
# Change default shell to zsh # Change default shell to zsh
chsh -s /bin/zsh userdo chsh -s /bin/zsh
# dotfiles # dotfiles
# This will overwrite existing dotfiles... # This will overwrite existing dotfiles...
cd ~/agit/ git clone https://github.com/aney/dotfiles $REPO/adotfiles/
git clone https://github.com/aney/dotfiles ~/agit/adotfiles/ cp -r $REPO/adotfiles/* $HOME/.
cd ~/agit/adotfiles/
cp -r * ~/.
# Oh my Zsh
userinstall 'sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"'
# Extras. Bg image, icons, etc. # Extras. Bg image, icons, etc.

Loading…
Cancel
Save