Remove stuff accidentally added
This commit is contained in:
parent
b6ef39529c
commit
d5b06aeb37
196
10_install.txt
196
10_install.txt
@ -1,196 +0,0 @@
|
||||
# Use `cat` to get file with lines numbered
|
||||
cat -n 10_install.txt
|
||||
|
||||
# Use `eval` from `sed` on lines X-Y
|
||||
eval "$(sed -n X,Yp install.txt)"
|
||||
|
||||
# Ensure ethernet connection is up
|
||||
ip link
|
||||
|
||||
# Partition starting at 1MiB to 513MiB for boot per convention, then rest as ext2
|
||||
parted /dev/nvme0n1
|
||||
mklabel gpt
|
||||
mkpart primary 1MiB 513MiB
|
||||
set 1 boot on
|
||||
mkpart primary ext2 513MiB 99%
|
||||
align-check optimal 1
|
||||
align-check optimal 2
|
||||
|
||||
# Change partition types with t
|
||||
# Part 1 as ef00 for EFI system partition
|
||||
# Part 2 as 8309 for Linux LUKS
|
||||
gdisk /dev/nvme0n1p1
|
||||
|
||||
mkfs.vfat /dev/nvme0n1p1
|
||||
|
||||
# Create LUKS container
|
||||
cryptsetup luksFormat /dev/nvme0n1p2
|
||||
cryptsetup luksOpen /dev/nvme0n1p2 cryptoroot
|
||||
|
||||
# Partition starting at 0% to 4GiB for swap and 4GiB to 100% for ZFS
|
||||
parted /dev/mapper/cryptoroot
|
||||
mklabel gpt
|
||||
mkpart ext2 0% 4GiB
|
||||
mkpart ext2 4GiB 100%
|
||||
|
||||
# Change partition types with t
|
||||
# Part 1 as 8200 for swap
|
||||
# Part 2 as bf00 for solaris
|
||||
gdisk /dev/mapper/cryptoroot
|
||||
|
||||
# Make swap and swap on
|
||||
mkswap /dev/mapper/cryptoroot1
|
||||
swapon /dev/mapper/cryptoroot1
|
||||
|
||||
# Double check everything is correct
|
||||
lsblk /dev/nvme0n1
|
||||
|
||||
# Load zfs modules and ensure it's loaded
|
||||
modprobe zfs
|
||||
lsmod | grep -i zfs
|
||||
|
||||
# Create root zpool
|
||||
zpool create -f \
|
||||
-O acltype=posixacl \
|
||||
-O relatime=on \
|
||||
-O dnodesize=auto \
|
||||
-O xattr=sa \
|
||||
-O normalization=formD \
|
||||
-O canmount=off \
|
||||
-O devices=off \
|
||||
-m none \
|
||||
-R /mnt \
|
||||
zroot /dev/mapper/cryptoroot2
|
||||
|
||||
# Create datasets
|
||||
zfs create -o mountpoint=none zroot/data
|
||||
zfs create -o mountpoint=none -o compression=lz4 zroot/ROOT
|
||||
zfs create -o mountpoint=/ -o canmount=noauto zroot/ROOT/default
|
||||
zfs create -o mountpoint=/opt zroot/opt
|
||||
zfs create -o mountpoint=/var zroot/var
|
||||
zfs create zroot/var/log
|
||||
zfs create -o mountpoint=/var/lib -o canmount=off zroot/var/lib
|
||||
zfs create -o mountpoint=/home zroot/home
|
||||
zfs create -o mountpoint=/root zroot/home/root
|
||||
zfs create -o setuid=off -o devices=off -o sync=disabled -o mountpoint=/tmp zroot/tmp
|
||||
|
||||
# Prepare zpool
|
||||
zpool export zroot
|
||||
zpool import -d /dev/mapper/cryptoroot2 -R /mnt zroot -N
|
||||
|
||||
# Mount and check
|
||||
zfs mount zroot/ROOT/default
|
||||
zfs mount -a
|
||||
df -k
|
||||
|
||||
# Prepare device for pool
|
||||
zpool set bootfs=zroot/ROOT/default zroot
|
||||
zpool set cachefile=/etc/zfs/zpool.cache zroot
|
||||
mkdir -p /mnt/{etc/zfs,boot/efi}
|
||||
cp /etc/zfs/zpool.cache /mnt/etc/zfs/zpool.cache
|
||||
|
||||
# Mount boot part
|
||||
mount /dev/nvme0n1p1 /mnt/boot/efi
|
||||
|
||||
# Install with pacstrap
|
||||
pacman -Syy
|
||||
pacstrap /mnt base dkms git intel-ucode jq less linux linux-firmware linux-headers tmux vim zsh
|
||||
|
||||
# Create fs table and change root into mount
|
||||
genfstab -U -p /mnt/etc/fstab
|
||||
arch-chroot /mnt
|
||||
|
||||
# Remove zroot entries from fstab
|
||||
vim /etc/fstab
|
||||
|
||||
# Add archzfs repository
|
||||
vim /etc/pacman.conf
|
||||
----
|
||||
[archzfs]
|
||||
SigLevel = Optional TrustAll
|
||||
Server = https://zxcvfdsa.com/archzfs/$repo/$arch
|
||||
----
|
||||
|
||||
# Update repostories and install zfs-linux
|
||||
pacman -Syy
|
||||
pacman -S zfs-linux
|
||||
|
||||
# Set hooks for startup load order
|
||||
vim /etc/mkinitcpio.conf
|
||||
HOOKS=(base udev autodetect microcode modconf kms keymap consolefont block keyboard encrypt load_part resume zfs filesystems)
|
||||
|
||||
# Create loader to probe cryptoroot partition
|
||||
cat > /etc/initcpio/install/load_part << EOFHOOK
|
||||
#!/bin/bash
|
||||
|
||||
build() {
|
||||
add_binary 'partprobe'
|
||||
add_runscript
|
||||
}
|
||||
|
||||
help() {
|
||||
cat << HELPEOF
|
||||
Probes mapped LUKS container for partitions.
|
||||
HELPEOF
|
||||
}
|
||||
EOFHOOK
|
||||
cat > /etc/initcpio/hooks/load_part << EOFHOOK
|
||||
run_hook() {
|
||||
partprobe /dev/mapper/cryptoroot
|
||||
}
|
||||
EOFHOOK
|
||||
|
||||
# Update initramfs
|
||||
mkinitcpio -p linux
|
||||
|
||||
# Install packages
|
||||
pacman -S base-devel bind dhcpcd efibootmgr grub openssh os-prober reflector rsync systemd-networkd terminus-font
|
||||
|
||||
# Use blkid /dev/nvme0n1p2 for the uuid of cryptoroot and blkid /dev/mapper/cryptoroot2 for the uuid of the swap space and update the grub file
|
||||
vim /etc/default/grub
|
||||
----
|
||||
GRUB_CMDLINE_LINUX="cryptdevice=/dev/disk/by-uuid/<uuid>:cryptoroot rw resume=UUID=<swap UUID> root=ZFS=zroot/ROOT/default"
|
||||
GRUB_ENABLE_CRYPTODISK=y
|
||||
----
|
||||
|
||||
# Create grub config
|
||||
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ArchLinux
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
|
||||
# Enable important systems
|
||||
systemctl enable dhcpcd reflector.timer sshd systemd-networkd systemd-timesyncd
|
||||
systemctl enable zfs-import-cache zfs-import-scan zfs-mount zfs-share zfs-zed zfs.target
|
||||
|
||||
# Setup
|
||||
timedatectl set-timezone America/Vancouver
|
||||
ln -sf /usr/share/zoneinfo/Canada/Pacific /etc/localtime
|
||||
hwclock --systohc
|
||||
|
||||
# Make passwords
|
||||
passwd
|
||||
passwd iborrelli
|
||||
|
||||
# Make wheel sudoers
|
||||
visudo
|
||||
----
|
||||
%wheel ALL=(ALL) ALL
|
||||
----
|
||||
|
||||
# Backup reflector config and create new one
|
||||
cd /etc/xdg/reflector
|
||||
mv reflector.conf.orig
|
||||
vim reflector.conf
|
||||
----
|
||||
--country CA
|
||||
--protocol https
|
||||
--latest 5
|
||||
--sort rate
|
||||
--save /etc/pacman.d/mirrorlist
|
||||
----
|
||||
|
||||
# Exit chroot and clean up
|
||||
exit
|
||||
umount /mnt/boot
|
||||
zfs umount -a
|
||||
zpool export zroot
|
||||
reboot
|
||||
@ -1,9 +0,0 @@
|
||||
# To load from install medium run the following commands
|
||||
cryptsetup luksOpen /dev/nvme0n1p2 cryptoroot
|
||||
partprobe /dev/mapper/cryptoroot
|
||||
zpool import -d /dev/mapper/cryptoroot2 -R /mnt zroot -N
|
||||
zfs mount zroot/ROOT/default
|
||||
zfs mount -a
|
||||
swapon /dev/mapper/cryptoroot1
|
||||
mount /dev/nvme0n1p1 /mnt/boot
|
||||
arch-chroot /mnt
|
||||
@ -1,55 +0,0 @@
|
||||
# Paru
|
||||
|
||||
|
||||
git clone https://aur.archlinux.org/paru.git
|
||||
cd paru
|
||||
makepkg -si
|
||||
# If using rustup then run the following when prompted: rustup install stable
|
||||
cd ..
|
||||
sudo rm -r paru
|
||||
|
||||
paru -Syy
|
||||
|
||||
|
||||
|
||||
### Zsh
|
||||
paru -S zsh-theme-powerlevel10k-git zinit
|
||||
|
||||
|
||||
### First time installing zinit and zim
|
||||
# Zinit
|
||||
source ~/.zshrc
|
||||
zinit self-update
|
||||
|
||||
# ZIM
|
||||
curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
|
||||
|
||||
### Next time get all dot files
|
||||
|
||||
git clone --bare <git-repo-url> $HOME/.git
|
||||
/usr/bin/git --git-dir=$HOME/.git/ --work-tree=$HOME checkout
|
||||
|
||||
###
|
||||
|
||||
chsh -s /usr/bin/zsh
|
||||
|
||||
|
||||
# GUI
|
||||
paru -S --noconfirm greetd inotifywait-tools waybar hyprland zsh-theme-powerlevel10k-git nerd-fonts kitty neovim wl-clipboard wofi yazi
|
||||
|
||||
# Either tuigreet or regreet
|
||||
paru -S greetd-tuigreet
|
||||
sudo cp ./greetd/tuigreet/* /etc/greetd/
|
||||
# OR
|
||||
paru -S greetd-regreet
|
||||
sudo cp ./greetd/regreet/* /etc/greetd/
|
||||
sudo mkdir /usr/lib/backgrounds/
|
||||
# Add a jpg called greeter.jpg to the folder
|
||||
|
||||
|
||||
# Apps
|
||||
paru -S filezilla firefox flatpak haveged libreoffice-fresh mpv neofetch qbittorrent vlc yt-dlp
|
||||
|
||||
# Development
|
||||
paru -S nodejs-n zip
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
paru -S nvim
|
||||
|
||||
vim ~/.zshrc
|
||||
----
|
||||
export WAYLAND_DISPLAY=wayland-1
|
||||
----
|
||||
|
||||
|
||||
@ -1 +0,0 @@
|
||||
paru -S waybar
|
||||
@ -1,28 +0,0 @@
|
||||
paru -S nginx
|
||||
|
||||
sudo systemctl enable nginx
|
||||
|
||||
sudo mkdir /etc/nginx/sites-enabled
|
||||
sudo mkdir /etc/nginx/sites-available
|
||||
|
||||
# Add to /etc/nginx/nginx.conf within the `http {}` block
|
||||
include /etc/nginx/sites-enabled/*
|
||||
|
||||
# Create configurations in /etc/nginx/sites-available and link with
|
||||
sudo ln -s /etc/nginx/sites-availabe/example.conf /etc/nginx/sites-enabled/
|
||||
|
||||
# Create a dataset and group srvadmin for /srv
|
||||
sudo zfs create zroot/srv
|
||||
sudo groupadd srvadmin
|
||||
sudo chown -R root:srvadmin /srv
|
||||
sudo chmod -R 770 /srv
|
||||
sudo usermod -aG srvadmin $USER
|
||||
|
||||
# Serve a site with index.html
|
||||
sudo cp ./index.html /srv/http
|
||||
sudo chown -R http:http /srv/http
|
||||
sudo chmod -R 755 /srv/http
|
||||
sudo chmod 644 /srv/http/index.html
|
||||
sudo cp turboteam.run /etc/nginx/sites-available/turboteam.run.conf
|
||||
sudo ln -s /etc/nginx/sites-available/turboteam.run.conf /etc/nginx/sites-enabled/
|
||||
sudo systemctl reload nginx
|
||||
58
31_mail.txt
58
31_mail.txt
@ -1,58 +0,0 @@
|
||||
paru -S postfix dovecot certbot certbot-nginx postfix-mysql roundcubemail postfixadmin
|
||||
|
||||
sudo certbot --nginx -d mail.turboteam.run
|
||||
# Postfix
|
||||
|
||||
sudo vim /etc/postfix/main.cf
|
||||
----
|
||||
myhostname = mail.turboteam.run
|
||||
mydomain = turboteam.run
|
||||
|
||||
# Secure SMTP
|
||||
|
||||
smtp_tls_security_level = may
|
||||
smtpd_use_tls = yes
|
||||
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.turboteam.runpath/fullchain.pem
|
||||
smtpd_tls_key_file = /etc/letsencrypt/live/mail.turboteam.run/privkey.pem
|
||||
----
|
||||
|
||||
sudo vim /etc/postfix/master.cf
|
||||
----
|
||||
submission inet n - n - - smtpd
|
||||
# Uncommented for Dovecot auth
|
||||
-o smtpd_tls_security_level=encrypt
|
||||
-o smtpd_sasl_auth_enable=yes
|
||||
|
||||
# Added for Dovecot auth
|
||||
-o smtpd_sasl_type=dovecot
|
||||
-o smtpd_sasl_path=private/auth
|
||||
-o smtpd_sasl_security_options=noanonymous
|
||||
-o smtpd_sasl_local_domain=$myhostname
|
||||
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
||||
-o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject
|
||||
----
|
||||
|
||||
# Dovecot SSL
|
||||
sudo cp /usr/share/doc/dovecot/dovecot-openssl.cnf /etc/ssl/dovecot-openssl.cnf
|
||||
sudo vim /etc/ssl/dovecot-openssl.cnf
|
||||
----
|
||||
# Common Name (*.example.com is also possible)
|
||||
CN=imap.turboteam.run
|
||||
|
||||
# E-mail contact
|
||||
emailAddress=postmaster@turboteam.run
|
||||
----
|
||||
sudo /usr/lib/dovecot/mkcert.sh
|
||||
sudo cp /etc/ssl/certs/dovecot.pem /etc/ca-certificates/trust-source/anchors/dovecot.crt
|
||||
sudo trust extract-compat
|
||||
|
||||
sudo systemctl restart postfix
|
||||
sudo systemctl enable postfix --now
|
||||
|
||||
# Dovecot config
|
||||
sudo mkdir /etc/dovecot
|
||||
sudo cp /usr/share/doc/dovecot/example-config/dovecot.conf /etc/dovecot/
|
||||
sudo cp -r /usr/share/doc/dovecot/example-config/conf.d/ /etc/dovecot/
|
||||
|
||||
sudo vim /etc/dovecot/conf.d/10-mail.conf
|
||||
mail_location = maildir:/var/mail/%u/Maildir
|
||||
@ -1,10 +0,0 @@
|
||||
paru -S certbot certbot-nginx bind
|
||||
|
||||
sudo certbot --nginx
|
||||
|
||||
sudo vim /usr/lib/systemd/system/certbot-renew.service
|
||||
# Add to the ExecStart command the following flag
|
||||
----
|
||||
--post-hook "systemctl reload nginx.service"
|
||||
|
||||
sudo systemctl enable certbot-renew.timer --now
|
||||
@ -1,19 +0,0 @@
|
||||
paru -S docker docker-compose
|
||||
|
||||
sudo groupadd docker
|
||||
sudo usermod -aG docker $USER
|
||||
newgrp docker
|
||||
|
||||
sudo zfs create zroot/var/lib/docker
|
||||
sudo chown -R root:docker /var/lib/docker
|
||||
sudo chmod -R 750 /var/lib/docker
|
||||
|
||||
sudo mkdir /etc/docker/
|
||||
sudo vim /etc/docker/daemon.json
|
||||
----
|
||||
{
|
||||
"group": "srvadmin",
|
||||
"storage-driver": "zfs"
|
||||
}
|
||||
|
||||
sudo systemctl enable docker.socket --now
|
||||
@ -1,5 +0,0 @@
|
||||
cp -r ./gitea/ /srv/
|
||||
sudo chown -R root:srvadmin /srv/gitea/
|
||||
sudo chmod -R 770 /srv/gitea/
|
||||
cd /srv/gitea/
|
||||
docker compose up -d
|
||||
@ -1,35 +0,0 @@
|
||||
volumes:
|
||||
gitea-data:
|
||||
driver: local
|
||||
gitea-config:
|
||||
driver: local
|
||||
services:
|
||||
server:
|
||||
image: docker.gitea.com/gitea:1.23.6-rootless
|
||||
environment:
|
||||
- GITEA__database__DB_TYPE=mysql
|
||||
- GITEA__database__HOST=db:3306
|
||||
- GITEA__database__NAME=gitea
|
||||
- GITEA__database__USER=gitea
|
||||
- GITEA__database__PASSWD=gitea
|
||||
- TZ=Canada/Vancouver
|
||||
restart: always
|
||||
volumes:
|
||||
- gitea-data:/var/lib/gitea
|
||||
- gitea-config:/etc/gitea
|
||||
ports:
|
||||
- "3001:3000"
|
||||
- "2222:2222"
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: docker.io/library/mysql:8
|
||||
restart: always
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=gitea
|
||||
- MYSQL_USER=gitea
|
||||
- MYSQL_PASSWORD=gitea
|
||||
- MYSQL_DATABASE=gitea
|
||||
volumes:
|
||||
- ./mysql:/var/lib/mysql
|
||||
@ -1 +0,0 @@
|
||||
exec-once = regreet; hyprctl dispatch exit
|
||||
@ -1,7 +0,0 @@
|
||||
[terminal]
|
||||
vt = 1
|
||||
|
||||
[default_session]
|
||||
command = "Hyprland --config /etc/greetd/hyprland.conf"
|
||||
user = "iborrelli"
|
||||
|
||||
@ -1 +0,0 @@
|
||||
exec-once = regreet; hyprctl dispatch exit
|
||||
@ -1,18 +0,0 @@
|
||||
[commands]
|
||||
reboot = [ "systemctl", "reboot" ]
|
||||
poweroff = [ "systemctl", "poweroff" ]
|
||||
|
||||
[background]
|
||||
path = "/usr/share/backgrounds/greeter.jpg"
|
||||
fit = "Cover"
|
||||
|
||||
[GTK]
|
||||
application_prefer_dark_theme = true
|
||||
cursor_theme_name = "Adwaita"
|
||||
font_name = "CaskaydiaCove Nerd Font Mono 16"
|
||||
icon_theme_name = "Adwaita"
|
||||
theme_name = "Adwaita"
|
||||
|
||||
[widget.clock]
|
||||
format = "%a %F %H:%M (%Z)"
|
||||
resolution = "100ms"
|
||||
@ -1,7 +0,0 @@
|
||||
[terminal]
|
||||
vt = 1
|
||||
|
||||
[default_session]
|
||||
command = "tuigreet --window-padding 2 --time -r --remember-session --theme 'border=brightyellow;text=cyan;input=brightcyan;time=brightwhite;action=brightwhite;button=white;container=black;prompt=brightmagenta'"
|
||||
user = "iborrelli"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user