Browse Source

Working on the install script

main
Yiğit Çolakoğlu 4 years ago
parent
commit
cd953cf893
10 changed files with 1158 additions and 11 deletions
  1. +70
    -0
      arch-setup.sh
  2. +27
    -0
      chroot/AUR.txt
  3. +66
    -0
      chroot/chroot.sh
  4. +156
    -0
      chroot/nonAUR.txt
  5. +4
    -0
      chroot/plist.sh
  6. +5
    -0
      root/dwm.desktop
  7. +826
    -0
      root/nancyj.flf
  8. +1
    -1
      suckless/dwm/config.h
  9. +1
    -1
      vim/vim/plugin/plugins.vim
  10. +2
    -9
      xorg/xinitrc

+ 70
- 0
arch-setup.sh View File

@ -0,0 +1,70 @@
#!/bin/bash
# Disk setup
echo -n "What is the install device: "
read $device
echo "Installing to $device... (Enter to continue)"
read $_
# Disk wipe
echo "[INFO]: Wiping disk"
cryptsetup open --type plain -d /dev/urandom $device wipe
dd if=/dev/zero of=/dev/mapper/wipe status=progress
cryptsetup close wipe
# Cleaning device from previous LUKS setups
cryptsetup erase $device
wipefs -a device
# Set partition table
parted $device mklabel gpt
# Create the boot partition
echo "[INFO]: Creating boot partition"
parted -a optimal $device mkpart 1 primary 0% 512MB
mkfs.fat -F32 "$device"1
echo -n "Enter swap size + 512MB: "
read $swap_size
echo "Installing to $swap_size... (Enter to continue)"
read $_
# Create the swap partition
echo "[INFO]: Creating swap partition"
parted -a optimal $device mkpart 2 primary 512MB $swap_size
echo "[INFO]: Enter password for swap encryption"
cryptsetup luksFormat "$device"2
sudo dd if=/dev/urandom of=/root/.keys/swap-keyfile bs=1024 count=4
sudo chmod 600 /root/.keys/swap-keyfile
echo "[INFO]: Re-Enter password for swap encryption"
sudo cryptsetup luksAddKey "$device"2 /root/.keys/swap-keyfile
echo "[INFO]: Keyfile saved to /root/.keys/swap-keyfile"
cryptsetup open --key-file="/root/.keys/swap-keyfile" "$device"2 swap
mkswap /dev/mapper/swap
swapon /dev/mapper/swap
# Create the root partition
echo "[INFO]: Creating root partition"
parted -a optimal $device mkpart 3 primary $swap_size 100%
echo "[INFO]: Enter password for root encryption"
cryptsetup luksFormat "$device"3
dd bs=512 count=4 if=/dev/random of=/root/.keys/root-keyfile iflag=fullblock
sudo chmod 600 /root/.keys/root-keyfile
echo "[INFO]: Re-Enter password for root encryption"
sudo cryptsetup luksAddKey "$device"3 /root/.keys/root-keyfile
echo "[INFO]: Keyfile saved to /root/.keys/root-keyfile"
cryptsetup open --key-file="/root/.keys/root-keyfile" "$device"3 root
mkfs.ext4 /dev/mapper/root
mkdir /mnt/sys
mount "$device"1 /mnt/sys
mkdir /mnt/sys/boot
mount "$device"1 /mnt/sys/boot
pacstrap /mnt/sys base linux linux-firmware base-devel git vim
genfstab -U /mnt/sys >> /mnt/sys/etc/fstab
# Run on chrooted arch install
cp -r ./chroot /mnt/sys/install
cp -r /root/.keys /mnt/sys/root
echo -n "$device" > /mnt/sys/install/device
arch-chroot /mnt/sys /install/install.sh

+ 27
- 0
chroot/AUR.txt View File

@ -0,0 +1,27 @@
activitywatch-bin
antibody
betterlockscreen
direnv
ghidra-darcula
gitkraken
glxinfo
i3lock-color
ifuse
jetbrains-toolbox
ly
mailspring
mconnect-git
ngrok
numix-icon-theme-git
postman-bin
qt5-styleplugins
rofi-bluetooth-git
rofi-dmenu
spicetify-cli
spotify
spotify-tui
sublime-text-3
vue-cli
whatsapp-nativefier-dark
yay
zoom

+ 66
- 0
chroot/chroot.sh View File

@ -0,0 +1,66 @@
#!/bin/bash
ln -sf /usr/share/zoneinfo/Europe/Istanbul /etc/localtime
hwclock --systohc
echo -e "en_US.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8" > /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "KEYMAP=trq" > /etc/vconsole.conf
echo "tatooine" > /etc/hostname
git clone https://aur.archlinux.org/yay.git /tmp/yay
(cd /tmp/yay; makepkg -si)
systemctl enable fstrim.timer
echo -e "127.0.0.1 localhost\n::1 localhost\n127.0.0.1 tatooine.localdomain tatooine" > /etc/hosts
cat << EOF > /etc/mkinitcpio.conf
MODULES=()
BINARIES=()
FILES=()
HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt vfat filesystems fsck)
EOF
cat << EOF > /etc/initcpio/hooks/openswap
run_hook ()
{
x=0;
while [ ! -b /dev/mapper/root ] && [ \$x -le 10 ]; do
x=$((x+1))
sleep .2
done
mkdir crypto_key_device
mount /dev/mapper/root crypto_key_device
cryptsetup open --key-file crypto_key_device/root/.keys/swap-keyfile $(cat /install/device)2 swap
umount crypto_key_device
}
EOF
cat << EOF > /etc/initcpio/install/openswap
build ()
{
add_runscript
}
help ()
{
cat<<HELPEOF
This opens the swap encrypted partition $(cat /install/device)1 in /dev/mapper/swap
HELPEOF
}
EOF
line=1
for i in $(blkid); do
echo "$line: $i"
((line=line+1))
done
echo "Please select the device you will save the LUKS key to:"
read $keydev
uuid=$(blkid | sed -n 's/.*UUID=\"\([^\"]*\)\".*/\1/p' | sed -n "$line"p)
cat << EOF > /boot/refind_linux.conf
"Boot with encryption" "root=/dev/mapper/root resume=/dev/mapper/swap cryptdevice=UUID=$(blkid -s UUID -o value $(cat /install/device)3):root:allow-discards cryptkey=UUID=$uuid:vfat:key.yeet rw loglevel=3 quiet"
EOF
cat /install/nonAUR.txt | xargs pacman -S --needed --noconfirm
yay -S $(cat /install/AUR.txt)
mkinitcpio -P

+ 156
- 0
chroot/nonAUR.txt View File

@ -0,0 +1,156 @@
arandr
arc-gtk-theme
autoconf
automake
baobab
base
bat
binutils
bison
blueman
bluez-utils
calibre
chrony
clipmenu
cmake
discord
dunst
efibootmgr
fakeroot
feh
figlet
file
findutils
firefox-developer-edition
flex
gawk
gcc
gdm
gettext
git
gnome-bluetooth
gnome-keyring
gradle
grep
groff
grub
gvfs-afc
gzip
htop
inetutils
jdk11-openjdk
jre11-openjdk
kitty
libgnome-keyring
libtool
lightdm
lightdm-gtk-greeter
linux
linux-firmware
linux-headers
lxappearance
m4
make
mariadb
mlocate
mysql-workbench
nemo
neovim
net-tools
networkmanager
nextcloud-client
noto-fonts-emoji
npm
ntfs-3g
openssh
pacman
pamixer
patch
pavucontrol
picom
pkgconf
playerctl
polkit-gnome
pulseaudio
pulseaudio-alsa
pulseaudio-bluetooth
python-pynvim
qt5ct
redis
refind
rofi
rsync
sed
shotwell
sudo
telegram-desktop
termite
texinfo
thunar
tmux
tree
unzip
vi
vim
virtualbox
virtualbox-host-dkms
vlc
wget
which
xclip
xf86-video-amdgpu
xf86-video-intel
xf86-video-vesa
xorg-bdftopcf
xorg-docs
xorg-font-util
xorg-fonts-100dpi
xorg-fonts-75dpi
xorg-fonts-encodings
xorg-iceauth
xorg-mkfontscale
xorg-server
xorg-server-common
xorg-server-devel
xorg-server-xephyr
xorg-server-xnest
xorg-server-xvfb
xorg-sessreg
xorg-setxkbmap
xorg-smproxy
xorg-x11perf
xorg-xauth
xorg-xbacklight
xorg-xcmsdb
xorg-xcursorgen
xorg-xdpyinfo
xorg-xdriinfo
xorg-xev
xorg-xgamma
xorg-xhost
xorg-xinit
xorg-xinput
xorg-xkbcomp
xorg-xkbevd
xorg-xkbutils
xorg-xkill
xorg-xlsatoms
xorg-xlsclients
xorg-xmodmap
xorg-xpr
xorg-xprop
xorg-xrandr
xorg-xrdb
xorg-xrefresh
xorg-xset
xorg-xsetroot
xorg-xvinfo
xorg-xwayland
xorg-xwd
xorg-xwininfo
xorg-xwud
xss-lock
xterm
youtube-dl
zathura
zsh

+ 4
- 0
chroot/plist.sh View File

@ -0,0 +1,4 @@
#!/bin/bash
pacman -Qqe | grep -v "$(pacman -Qqm)" > nonAUR.txt
pacman -Qqm > AUR.txt

+ 5
- 0
root/dwm.desktop View File

@ -0,0 +1,5 @@
[Desktop Entry]
Encoding=UTF-8
Name=Dynamic Window Manager
Comment=Runs the window manager defined by xsession script
Exec=~/.xinitrc

+ 826
- 0
root/nancyj.flf View File

@ -0,0 +1,826 @@
flf2a$ 8 6 15 -1 9
nancyj.flf
named after the login of a woman who asked me to make her a
sig. this is the font that came out of it. this is my first
attempt at a figlet font, so leave me alone.
vampyr@acs.bu.edu
$$ @
$$ @
$$ @
$$ @
$$ @
$$ @
$$ @
$$ @@
dP @
88 @
88 @
dP @
@
oo @
@
@@
dP dP @
dP dP @
@
@
@
@
@
@@
@
dP dP @
8888888 @
88 88 @
8888888 @
dP dP @
@
@@
# # @
.d8888P' @
Y8#oo#o. @
# #88 @
`88888P' @
# # @
@
@@
d8P dP @
8 8 d8' @
Y8P d8' @
d8' d8P @
d8' 8 8 @
88 Y8P @
@
@@
d88b @
8`'8 @
d8b @
d8P`8b @
d8' `8bP @
`888P'`YP @
@
@@
d8 @
88 @
.P @
@
@
@
@
@@
a88P @
d8' @
88 @
88 @
Y8. @
Y88b @
@
@@
Y88o @
`8b @
88 @
88 @
.8P @
d88Y @
@
@@
dP @
8b. 88 .d8 @
`8b88d8' @
.8P88Y8. @
8P' 88 `Y8 @
dP @
@
@@
@
dP @
88 @
88888888 @
88 @
dP @
@
@@
@
@
@
@
dP @
88 @
.P @
@@
@
@
@
88888888 @
@
@
@
@@
@
@
@
@
dP @
88 @
@
@@
d8' @
d8' @
d8' @
d8' @
d8' @
88 @
@
@@
a8888a @
d8' ..8b @
88 .P 88 @
88 d' 88 @
Y8'' .8P @
Y8888P @
@
@@
d88 @
88 @
88 @
88 @
88 @
d88P @
@
@@
d8888b. @
`88 @
.aaadP' @
88' @
88. @
Y88888P @
@
@@
d8888b. @
`88 @
aaad8' @
`88 @
.88 @
d88888P @
@
@@
dP dP @
88 88 @
88aaa88 @
88 @
88 @
dP @
@
@@
888888P @
88' @
88baaa. @
`88 @
88 @
d88888P @
@
@@
.d8888P @
88' @
88baaa. @
88` `88 @
8b. .d8 @
`Y888P' @
@
@@
d88888P @
d8' @
d8' @
d8' @
d8' @
d8' @
@
@@
.d888b. @
Y8' `8P @
d8bad8b @
88` `88 @
8b. .88 @
Y88888P @
@
@@
.d888b. @
Y8' `88 @
`8bad88 @
`88 @
d. .88 @
`8888P @
@
@@
dP @
88 @
@
@
dP @
88 @
@
@@
dP @
88 @
@
@
dP @
88 @
.P @
@@
d8 @
d8' @
d8' @
Y8. @
Y8. @
Y8 @
@
@@
@
@
aaaaaaaa @
@
88888888 @
@
@
@@
8b @
`8b @
`8b @
.8P @
.8P @
8P @
@
@@
.d8888ba @
`8' `8b @
.d8' @
d8P' @
"" @
oo @
@
@@
a88888b. @
d8' `88 @
88 d8P 88 @
88 Yo8b88 @
Y8. @
Y88888P' @
@
@@
.d888888 @
d8' 88 @
88aaaaa88a @
88 88 @
88 88 @
88 88 @
@
@@
888888ba @
88 `8b @
a88aaaa8P' @
88 `8b. @
88 .88 @
88888888P @
@
@@
a88888b. @
d8' `88 @
88 @
88 @
Y8. .88 @
Y88888P' @
@
@@
888888ba @
88 `8b @
88 88 @
88 88 @
88 .8P @
8888888P @
@
@@
88888888b @
88 @
a88aaaa @
88 @
88 @
88888888P @
@
@@
88888888b @
88 @
a88aaaa @
88 @
88 @
dP @
@
@@
.88888. @
d8' `88 @
88 @
88 YP88 @
Y8. .88 @
`88888' @
@
@@
dP dP @
88 88 @
88aaaaa88a @
88 88 @
88 88 @
dP dP @
@
@@
dP @
88 @
88 @
88 @
88 @
dP @
@
@@
dP @
88 @
88 @
88 @
88. .d8P @
`Y8888' @
@
@@
dP dP @
88 .d8' @
88aaa8P' @
88 `8b. @
88 88 @
dP dP @
@
@@
dP @
88 @
88 @
88 @
88 @
88888888P @
@
@@
8888ba.88ba @
88 `8b `8b @
88 88 88 @
88 88 88 @
88 88 88 @
dP dP dP @
@
@@
888888ba @
88 `8b @
88 88 @
88 88 @
88 88 @
dP dP @
@
@@
.88888. @
d8' `8b @
88 88 @
88 88 @
Y8. .8P @
`8888P' @
@
@@
888888ba @
88 `8b @
a88aaaa8P' @
88 @
88 @
dP @
@
@@
.88888. @
d8' `8b @
88 88 @
88 db 88 @
Y8. Y88P @
`8888PY8b @
@
@@
888888ba @
88 `8b @
a88aaaa8P' @
88 `8b. @
88 88 @
dP dP @
@
@@
.d88888b @
88. "' @
`Y88888b. @
`8b @
d8' .8P @
Y88888P @
@
@@
d888888P @
88 @
88 @
88 @
88 @
dP @
@
@@
dP dP @
88 88 @
88 88 @
88 88 @
Y8. .8P @
`Y88888P' @
@
@@
dP dP @
88 88 @
88 .8P @
88 d8' @
88 .d8P @
888888' @
@
@@
dP dP dP @
88 88 88 @
88 .8P .8P @
88 d8' d8' @
88.d8P8.d8P @
8888' Y88' @
@
@@
dP dP @
Y8. .8P @
Y8aa8P @
d8' `8b @
88 88 @
dP dP @
@
@@
dP dP @
Y8. .8P @
Y8aa8P @
88 @
88 @
dP @
@
@@
d8888888P @
.d8' @
.d8' @
.d8' @
d8' @
Y8888888P @
@
@@
8888P @
88 @
88 @
88 @
88 @
88888 @
@
@@
Yb @
`Yb @
`Yb @
`Yb @
`Yb @
88 @
@
@@
d8888 @
88 @
88 @
88 @
88 @
88888 @
@
@@
db @
d8'`8b @
`" "' @
@
@
@
@
@@
@
@
@
@
@
@
oooooooooooo @
@@
dP @
88 @
Y. @
@
@
@
@
@@
@
@
.d8888b. @
88' `88 @
88. .88 @
`88888P8 @
@
@@
dP @
88 @
88d888b. @
88' `88 @
88. .88 @
88Y8888' @
@
@@
@
@
.d8888b. @
88' `"" @
88. ... @
`88888P' @
@
@@
dP @
88 @
.d888b88 @
88' `88 @
88. .88 @
`88888P8 @
@
@@
@
@
.d8888b. @
88ooood8 @
88. ... @
`88888P' @
@
@@
.8888b @
88 " @
88aaa @
88 @
88 @
dP @
@
@@
@
@
.d8888b. @
88' `88 @
88. .88 @
`8888P88 @
.88 @
d8888P @@
dP @
88 @
88d888b. @
88' `88 @
88 88 @
dP dP @
@
@@
oo @
@
dP @
88 @
88 @
dP @
@
@@
oo @
@
dP @
88 @
88 @
88 @
88 @
dP @@
dP @
88 @
88 .dP @
88888" @
88 `8b. @
dP `YP @
@
@@
dP @
88 @
88 @
88 @
88 @
dP @
@
@@
@
@
88d8b.d8b. @
88'`88'`88 @
88 88 88 @
dP dP dP @
@
@@
@
@
88d888b. @
88' `88 @
88 88 @
dP dP @
@
@@
@
@
.d8888b. @
88' `88 @
88. .88 @
`88888P' @
@
@@
@
@
88d888b. @
88' `88 @
88. .88 @
88Y888P' @
88 @
dP @@
@
@
.d8888b. @
88' `88 @
88. .88 @
`8888P88 @
88 @
dP @@
@
@
88d888b. @
88' `88 @
88 @
dP @
@
@@
@
@
.d8888b. @
Y8ooooo. @
88 @
`88888P' @
@
@@
dP @
88 @
d8888P @
88 @
88 @
dP @
@
@@
@
@
dP dP @
88 88 @
88. .88 @
`88888P' @
@
@@
@
@
dP .dP @
88 d8' @
88 .88' @
8888P' @
@
@@
@
@
dP dP dP @
88 88 88 @
88.88b.88' @
8888P Y8P @
@
@@
@
@
dP. .dP @
`8bd8' @
.d88b. @
dP' `dP @
@
@@
@
@
dP dP @
88 88 @
88. .88 @
`8888P88 @
.88 @
d8888P @@
@
@
d888888b @
.d8P' @
.Y8P @
d888888P @
@
@@
.d88P @
8: @
.oY8. @
d8 @
8: @
`Y88b @
@
@@
dP @
88 @
"' @
dP @
88 @
"' @
@
@@
d88b. @
:8 @
.8Yo. @
8b @
:8 @
Y88P' @
@
@@
.oo. .d @
dP" "d8P @
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@

+ 1
- 1
suckless/dwm/config.h View File

@ -75,7 +75,7 @@ static const Rule rules[] = {
*/
/* class instance title tags mask isfloating monitor */
{ "discord", NULL, NULL, 1 << 8, 0, -1 },
{ "mailspring", NULL, NULL, 1 << 8, 0, -1 },
{ "Mailspring", NULL, NULL, 1 << 7, 0, -1 },
{ "Termite", NULL, NULL, 1 << 0, 0, -1 },
{ "firefoxdeveloperedition", NULL, NULL, 1 << 1, 0, -1 },
{ "Tor Browser", NULL, NULL, 1 << 1, 0, -1 },


+ 1
- 1
vim/vim/plugin/plugins.vim View File

@ -33,7 +33,7 @@ Plug 'M4R7iNP/vim-inky'
Plug 'vim-airline/vim-airline'
Plug 'noscript/cSyntaxAfter'
Plug 'uiiaoo/java-syntax.vim'
Plug 'ycm-core/YouCompleteMe'
" Plug 'neoclide/coc.nvim', {'branch': 'release'}
"


+ 2
- 9
xorg/xinitrc View File

@ -1,7 +1,5 @@
#! /bin/sh
#wal -sR &
#~/.scripts/toggle_monitor.sh
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export DRI_PRIME=1
feh --bg-fill /home/yigit/Pictures/Wallpapers/ocean-cliff.jpg #Backgroun
xrdb ~/.Xresources &
@ -13,22 +11,17 @@ setxkbmap tr
firefox-developer-edition &
nextcloud --background &
jetbrains-toolbox --minimize &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
xss-lock -- betterlockscreen -l -t 'Stay the fuck out!' &
picom --no-fading-openclose &
xmodmap ~/.Xmodmap
aw-server &
aw-watcher-window &
aw-watcher-afk &
mconnect -d &
mailspring &
dbus-update-activation-environment --systemd DISPLAY
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
export QT_QPA_PLATFORMTHEME="qt5ct"
if [ -f ~/.xmodmap ]; then
xmodmap ~/.xmodmap
fi
exec dwm
exec dwm

Loading…
Cancel
Save