Properly mantain Arch Linux, new script, and fastest mirror selector
This commit is contained in:
14
README.md
14
README.md
@@ -12,12 +12,18 @@ curl -L https://raw.githubusercontent.com/TrudeEH/dotfiles/main/install.sh | bas
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
- Nix (installed automatically)
|
||||
- Nix (installed automatically)
|
||||
|
||||
## Custom commands
|
||||
- `extract` Extract compressed files
|
||||
- `update` Update Nix and the OS.
|
||||
- `reload` Rebuild the config after changing it.
|
||||
- `extract` Extract compressed files
|
||||
- `update` Update Nix and the OS.
|
||||
- `reload` Rebuild the config after changing it.
|
||||
|
||||
## Scripts
|
||||
- `archinstall` Install Arch Linux from the liveCD.
|
||||
```sh
|
||||
curl -L https://raw.githubusercontent.com/TrudeEH/dotfiles/main/scripts/archinstall.sh | bash
|
||||
```
|
||||
|
||||
## Supported distros
|
||||
- Debian
|
||||
|
||||
15
home.nix
15
home.nix
@@ -89,12 +89,17 @@
|
||||
echo "Updating Arch..."
|
||||
sudo pacman -Syu
|
||||
sudo pacman -Rsn $(pacman -Qdtq)
|
||||
if p c pacman-contrib &>/dev/null; then
|
||||
paccache -rk1
|
||||
else
|
||||
sudo pacman -S pacman-contrib
|
||||
paccache -rk1
|
||||
echo "Selecting the fastest mirrors..."
|
||||
if [ ! "$(command -v reflector)" ]; then
|
||||
sudo pacman -Syu --noconfirm reflector
|
||||
fi
|
||||
reflector -a 48 -c $iso -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist
|
||||
echo "Cleaning pacman cache..."
|
||||
if [ ! "$(command -v paccache)" ]; then
|
||||
sudo pacman -Syu --noconfirm pacman-contrib
|
||||
fi
|
||||
paccache -rk1
|
||||
echo "Cleaning old logs..."
|
||||
sudo journalctl --vacuum-time=7d
|
||||
elif [ "$(grep -Ei 'fedora' /etc/*release)" ]; then
|
||||
echo "Updating Fedora..."
|
||||
|
||||
10
scripts/archInstall.sh
Normal file
10
scripts/archInstall.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
# Script to install Arch Linux from the liveCD.
|
||||
|
||||
echo "[+] Installing dependencies..."
|
||||
pacman -Sy --noconfirm curl reflector archlinux-keyring
|
||||
|
||||
echo "[+] Selecting the fastest mirrors..."
|
||||
reflector -a 48 -c $iso -f 5 -l 20 --sort rate --save /etc/pacman.d/mirrorlist
|
||||
|
||||
archinstall
|
||||
Reference in New Issue
Block a user