Move to Federated Gitea
This commit is contained in:
120
README.md
Normal file
120
README.md
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# Federated CoreDesktop according to Duggins
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
This is simply some scripts to take an install of Arch Linux and the Gnome desktop environment and add some Gnome extensions so that you get a great tiling environment that can be 100% controlled from the keyboard. But, with Gnome, you get a nice mouse-capable desktop, too.
|
||||||
|
|
||||||
|
Additionally, we install a lot of useful software mostly for work at Federated Computer. You may want to suggest some missing titles or services. Please do! Or send in a PR.
|
||||||
|
|
||||||
|
These scripts are based on the work of Typecraft.
|
||||||
|
|
||||||
|
I dedicate this humble effort to Bero of Switzerland. I know he would want this to exist.
|
||||||
|
|
||||||
|
## Installing Arch
|
||||||
|
|
||||||
|
1) Download the ISO for Arch from [this link](https://archlinux.org/download/). You may need to scroll down to find the download links.
|
||||||
|
2) Write the ISO file to a USB stick.
|
||||||
|
3) Boot from the Arch ISO USB stick. When the ISO has booted, type `archinstall` to get to the simple installer.
|
||||||
|
4) You will go through the different options. Mostly choose the defaults.
|
||||||
|
5) Video cards: IF YOU HAVE AN NVIDIA GPU, CHOOSE THE PROPRIETARY NVIDIA OPTION. Choose the AMD option for AMD cards. Just works better.
|
||||||
|
6) For sound, "pipewire" is strongly recommended for the sound system choice during install. This is known to work really well with Jitsi, Element, and the other Federated Core SaaS applications. This may no longer be required in the newest installations of Arch Linux.
|
||||||
|
7) Reboot the system and log in. You should have a working Arch system at this point but without the Coredesktop configurations.
|
||||||
|
|
||||||
|
## (A Note About Networking in Arch)
|
||||||
|
|
||||||
|
You'll need a connection to the internet to successfully install Arch.
|
||||||
|
|
||||||
|
If you have a wired connection, then your network should "just work" and you can use that to configure your Arch network installation. But if you do not have a wired connection and you have a wifi chip installed in your computer, before installing Arch you'll want to set up the wifi network. You can do that using the too `iwctl`.
|
||||||
|
|
||||||
|
Type `iwctl` and that will put you into the utility `iwd`.
|
||||||
|
|
||||||
|
To list the wireless adapters type: `device list`. If your wireless device is "wlan0" (for example) you next type: `station wlan0 scan` to put the wireless chip into scan mode then `station wlan0 get-networks` to find the wireless networks available. The join your wireless network with the command `station wlan0 connect SSID` where SSID is the wireless network name. You can test your network with a ping to some server, etc.
|
||||||
|
|
||||||
|
When you have the wireless network working, then you can proceed to install Arch.
|
||||||
|
|
||||||
|
## Installing Federated CoreDesktop
|
||||||
|
|
||||||
|
1) Open the "Web" browser then navigate to https://gitea.young.computer and click "Explore" and "CoreDesktop". Scroll down and you'll find the command to enter to kick off installation.
|
||||||
|
|
||||||
|
2) Open a terminal, then enter the following command (you copied it from Gitea in step #1):
|
||||||
|
|
||||||
|
```
|
||||||
|
wget -qO- https://gitea.young.computer/david/desktoplinux.arch/raw/branch/main/install.sh | bash
|
||||||
|
```
|
||||||
|
3) You'll have to enter your password a couple times and click to install a gnome extension. Be patient. When the installation finishes, reboot (command: 'sudo reboot now') so that Element can find the encryption keychain.
|
||||||
|
|
||||||
|
4) If something fails, just run the script again. The typical fails are not entering the password in time, or failing to click on a Gnome extension dialog. Just re-run the script and tt will get through everything. :) You'll know you're done when the script asks you to reboot your machine.
|
||||||
|
|
||||||
|
## Notes about what is installed
|
||||||
|
|
||||||
|
You will end up with a Gnome system with a three-tile set up (great for widescreens). If you want to change the tiling, the icon in the top right of your screen allows you to change your tiling setup however you want. Using the super key (windows key or equivalent) plus the arrow keys, you can move windows around the screen.
|
||||||
|
|
||||||
|
The scripts are installed in ~/.local/share/coredesktop/
|
||||||
|
|
||||||
|
The scripts install lots of useful software. There are (4) main ways software is installed: pacman, AUR, Flathub, and mise.
|
||||||
|
|
||||||
|
### Pacman
|
||||||
|
|
||||||
|
Pacman installs software from the "packages.conf" file. It installs software such as nice versions of neovim, tmux, VS Codium (VS Code without the M$ surveillance), Go, etc. Tell me if you want other tools or submit a pull request.
|
||||||
|
|
||||||
|
### AUR
|
||||||
|
|
||||||
|
Yay is installed as is the way AUR packages are installed and maintained. Examples include the Helium Browser and Winboat.
|
||||||
|
|
||||||
|
### Flathub
|
||||||
|
|
||||||
|
The file "install-flatpaks.sh" file for Flatpaks.
|
||||||
|
|
||||||
|
Flatpaks installed: Chrome, Chromium, Firefox, Brave, Zen, Vivaldi, Warehouse (manage Flatpaks), Embellish (manage fonts), Revolt (Discord clone), Impression (burn ISOs to usb sticks), Logseq (note taking), Apostrophe (markdown writer), Signal (messaging), Thunderbird (email), Trayscale (tailnet), VS Code (IDE), Telegram (messaging), LibbreOffice, Extension Manager (for Gnome extensions), Nextcloud client, Kdenlive (video editing), OBS (video recording), Discord (messaging), Spotify (music), VLC (video watching), Obsidian (note taking), qBittorent, Bitwarden desktop, Inkscape (postscript editor), Zoom, Audacity (audio editing), Remmina (remote desktop), Postman, Alpaca (work with AI), DBeaver (database client), Jellyfin Media (client), Zen (interesting browser project), Localsend (send stuff to other devices easily), Boxes (virtual machines) and much else.
|
||||||
|
|
||||||
|
If you want to install more software from Flathub, simple visit https://flathub.org.
|
||||||
|
|
||||||
|
### Mise
|
||||||
|
|
||||||
|
Ruby and Rails are installed using Mise from the file "install-mise-ruby-rails.sh".
|
||||||
|
|
||||||
|
### Development Tools
|
||||||
|
|
||||||
|
Lots of development tools including neovim, tmux, go, hugo, python, rust, rails, ruby, docker and docker compose, etc. Three terminals: console, kitty, ghostty.
|
||||||
|
|
||||||
|
### Printing and Networking
|
||||||
|
|
||||||
|
The printing service (cups) is turned on. This may need more work to "just work" with other "coredesktop" machines.
|
||||||
|
|
||||||
|
mDNS is installed and enabled so the your can find and SSH to your machine on your LAN using {machinename}.local.
|
||||||
|
|
||||||
|
## Keep your System Up-to-date
|
||||||
|
|
||||||
|
From time-to-time, you'll want to update your system. Hopefully you'll do this more than once-a-month.
|
||||||
|
|
||||||
|
To update the system type into the terminal:
|
||||||
|
|
||||||
|
```
|
||||||
|
coreupdate
|
||||||
|
```
|
||||||
|
|
||||||
|
The script does three things. It runs 'flatpak update' to update your Flatpak apps, it runs 'gem update' to update your Rails environment, and it runs 'sudo pacman -Syu' to update your Arch and Gnome installation.
|
||||||
|
|
||||||
|
It is a good idea to reboot after an update especially if you see you have a new Linux kernel installed (and that happens frequently enough for Arch).
|
||||||
|
|
||||||
|
Note: sometimes, for whatever reason, the update barfs. Take a look at [https://archlinux.org](https://archlinux.org) in the "Latest News" section for fixes.
|
||||||
|
|
||||||
|
### Refresh your system
|
||||||
|
|
||||||
|
If you want to pull down "new" additions to Coredesktop, run in the terminal:
|
||||||
|
|
||||||
|
```
|
||||||
|
corerefresh
|
||||||
|
```
|
||||||
|
|
||||||
|
This will download the latest repo and run through the original installation script adding any "new" applications or services. You should run "coreupdate" after running "corerefresh".
|
||||||
|
|
||||||
|
## mDNS Networking
|
||||||
|
|
||||||
|
If you want to use mDNS networking on your LAN (the ability to log in to other local machines using the format "machine.local"), then you should replace /etc/nsswitch.conf with the one in this repository and add /etc/mdns.allow. These two files are formatted to avoid any conflicts with systemd-resolved that may cause nss-mdns not to work. See: https://wiki.archlinux.org/title/Avahi#Hostname_resolution (section 4.2) for more information.
|
||||||
|
|
||||||
|
## Bonus
|
||||||
|
|
||||||
|
Bonus: here's a [nice song to listen to while you're installing](https://music.youtube.com/watch?v=y-5o2f9wzmw&si=_z9kcKHRwj-KTs7w).
|
||||||
25
corerefresh
Executable file
25
corerefresh
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Print the logo
|
||||||
|
print_logo() {
|
||||||
|
cat << "EOF"
|
||||||
|
|
||||||
|
|
||||||
|
██
|
||||||
|
█ ██
|
||||||
|
██ ██████ █████ ██ █████ █████ ████ ██ █████ ██
|
||||||
|
██ ██ ██ ███ ███████ ██ ██ ██ ██ ██ ████████ ██ ██ ███████
|
||||||
|
█████ ██████ ██ ██ ██████ ██ ████████ ██ █ ███████ ██ ██
|
||||||
|
██ ██████ ███████ ██████ ██ ██████ ██████ ██████ ███████
|
||||||
|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear screen and show logo
|
||||||
|
clear
|
||||||
|
print_logo
|
||||||
|
|
||||||
|
echo "Let's get the lastest changes to CoreDesktop..."
|
||||||
|
|
||||||
|
wget -qO- https://gitea.young.computer/david/desktoplinux.arch/raw/branch/main/install.sh | bash
|
||||||
51
coreupdate
Executable file
51
coreupdate
Executable file
@@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Print the logo
|
||||||
|
print_logo() {
|
||||||
|
cat << "EOF"
|
||||||
|
|
||||||
|
|
||||||
|
██
|
||||||
|
█ ██
|
||||||
|
██ ██████ █████ ██ █████ █████ ████ ██ █████ ██
|
||||||
|
██ ██ ██ ███ ███████ ██ ██ ██ ██ ██ ████████ ██ ██ ███████
|
||||||
|
█████ ██████ ██ ██ ██████ ██ ████████ ██ █ ███████ ██ ██
|
||||||
|
██ ██████ ███████ ██████ ██ ██████ ██████ ██████ ███████
|
||||||
|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear screen and show logo
|
||||||
|
clear
|
||||||
|
print_logo
|
||||||
|
|
||||||
|
echo "Updating Arch..."
|
||||||
|
sudo pacman -Syu
|
||||||
|
|
||||||
|
echo "Updating AUR..."
|
||||||
|
|
||||||
|
if ! yay -Sua 2>/dev/null; then
|
||||||
|
echo "yay -Sua returned an error. Let's rebuild YAY."
|
||||||
|
sudo pacman -R yay
|
||||||
|
cd /tmp
|
||||||
|
git clone https://aur.archlinux.org/yay.git
|
||||||
|
cd yay
|
||||||
|
makepkg -si
|
||||||
|
cd ..
|
||||||
|
rm -rf yay
|
||||||
|
cd
|
||||||
|
yay -Sua --noconfirm
|
||||||
|
else
|
||||||
|
yay -Sua --noconfirm
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Updating Flatpaks..."
|
||||||
|
flatpak update
|
||||||
|
|
||||||
|
echo "Updating Ruby and Rails..."
|
||||||
|
mise upgrade --bump ruby
|
||||||
|
mise reshim
|
||||||
|
gem update
|
||||||
|
|
||||||
|
echo "Done. You probably want to reboot your system..."
|
||||||
27
fixmdns.sh
Executable file
27
fixmdns.sh
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Purpose : Configure Avahi mDNS and disable systemd-resolved
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "Installing Avahi and nss-mdns..."
|
||||||
|
sudo pacman -S --noconfirm avahi nss-mdns
|
||||||
|
|
||||||
|
echo "Enabling Avahi daemon..."
|
||||||
|
sudo systemctl enable avahi-daemon.service
|
||||||
|
|
||||||
|
echo "Updating /etc/nsswitch.conf..."
|
||||||
|
sudo sed -i 's/^hosts:.*/hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns/' /etc/nsswitch.conf
|
||||||
|
|
||||||
|
# Verify the change was made
|
||||||
|
if grep -q "mdns_minimal" /etc/nsswitch.conf; then
|
||||||
|
echo "nsswitch.conf updated successfully."
|
||||||
|
else
|
||||||
|
echo "Error: nsswitch.conf was not updated. Please check the file manually."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Copying Avahi SSH service file..."
|
||||||
|
sudo cp /usr/share/doc/avahi/ssh.service /etc/avahi/services/
|
||||||
|
|
||||||
|
echo "Avahi mDNS configuration complete."
|
||||||
36
gnome/gnome-extensions.sh
Executable file
36
gnome/gnome-extensions.sh
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
source "$SCRIPT_DIR/../utils.sh"
|
||||||
|
|
||||||
|
PYTHON="$(which python3)"
|
||||||
|
|
||||||
|
install_packages python-pipx gnome-shell-extensions
|
||||||
|
|
||||||
|
# Install or reinstall gext if missing or broken
|
||||||
|
if ! ~/.local/bin/gext --version &> /dev/null; then
|
||||||
|
echo "gext missing or broken, reinstalling..."
|
||||||
|
pipx uninstall gnome-extensions-cli 2>/dev/null || true
|
||||||
|
pipx install --python "$PYTHON" gnome-extensions-cli --system-site-packages
|
||||||
|
fi
|
||||||
|
|
||||||
|
EXTENSIONS=(
|
||||||
|
"tilingshell@ferrarodomenico.com"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo "Detected GNOME Shell version: $(gnome-shell --version)"
|
||||||
|
|
||||||
|
for ext in "${EXTENSIONS[@]}"; do
|
||||||
|
if ~/.local/bin/gext list | grep -q "$ext"; then
|
||||||
|
echo "Extension already installed: $ext"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing extension: $ext..."
|
||||||
|
~/.local/bin/gext install "$ext"
|
||||||
|
~/.local/bin/gext enable "$ext"
|
||||||
|
echo " Installed and enabled: $ext"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Load settings from dconf file
|
||||||
|
dconf load /org/gnome/shell/extensions/ < "$SCRIPT_DIR/gnome-settings.dconf"
|
||||||
9
gnome/gnome-settings.dconf
Normal file
9
gnome/gnome-settings.dconf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[tilingshell]
|
||||||
|
enable-autotiling=true
|
||||||
|
enable-window-border=false
|
||||||
|
last-version-name-installed='16.4'
|
||||||
|
layouts-json='[{"id":"Layout 2","tiles":[{"x":0,"y":0,"width":0.333203125,"height":1,"groups":[1]},{"x":0.333203125,"y":0,"width":0.3335937500000003,"height":1,"groups":[2,1]},{"x":0.666796875,"y":0,"width":0.33320312500000004,"height":1,"groups":[2]}]},{"id":"17750231","tiles":[{"x":0,"y":0,"width":1,"height":1,"groups":[]}]},{"id":"18652208","tiles":[{"x":0,"y":0,"width":0.5,"height":1,"groups":[1]},{"x":0.5,"y":0,"width":0.5000000000000004,"height":1,"groups":[1]}]}]'
|
||||||
|
move-window-right=['<Super>Right']
|
||||||
|
overridden-settings="{\"org.gnome.mutter.keybindings\":{\"toggle-tiled-right\":\"['<Super>Right']\",\"toggle-tiled-left\":\"['<Super>Left']\"},\"org.gnome.desktop.wm.keybindings\":{\"maximize\":\"['<Super>Up']\",\"unmaximize\":\"['<Super>Down', '<Alt>F5']\"},\"org.gnome.mutter\":{\"edge-tiling\":\"true\"}}"
|
||||||
|
selected-layouts=[['Layout 2'], ['Layout 2'], ['Layout 2'], ['17750231'], ['Layout 2'], ['17750231'], ['17750231'], ['17750231']]
|
||||||
|
window-border-width=uint32 1
|
||||||
7
gnome/gnome-settings.sh
Executable file
7
gnome/gnome-settings.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
# Get the directory where this script is located
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
|
||||||
|
echo "setting wallpaper to ${SCRIPT_DIR}/wallpaper.jpeg"
|
||||||
|
gsettings set org.gnome.desktop.background picture-uri-dark "file://${SCRIPT_DIR}/wallpaper.jpeg"
|
||||||
|
gsettings set org.gnome.desktop.background picture-options 'zoom'
|
||||||
54
install-flatpaks.sh
Executable file
54
install-flatpaks.sh
Executable file
@@ -0,0 +1,54 @@
|
|||||||
|
FLATPAKS=(
|
||||||
|
"com.google.Chrome"
|
||||||
|
"org.mozilla.firefox"
|
||||||
|
"org.chromium.Chromium"
|
||||||
|
"io.github.flattool.Warehouse"
|
||||||
|
"io.github.getnf.embellish"
|
||||||
|
"chat.revolt.RevoltDesktop"
|
||||||
|
"io.gitlab.adhami3310.Impression"
|
||||||
|
"com.logseq.Logseq"
|
||||||
|
"org.gnome.gitlab.somas.Apostrophe"
|
||||||
|
"org.signal.Signal"
|
||||||
|
"org.mozilla.Thunderbird"
|
||||||
|
"dev.deedles.Trayscale"
|
||||||
|
"com.vivaldi.Vivaldi"
|
||||||
|
"org.telegram.desktop"
|
||||||
|
"com.mattjakeman.ExtensionManager"
|
||||||
|
"com.nextcloud.desktopclient.nextcloud"
|
||||||
|
"org.kde.kdenlive"
|
||||||
|
"com.obsproject.Studio"
|
||||||
|
"com.brave.Browser"
|
||||||
|
"com.discordapp.Discord"
|
||||||
|
"com.spotify.Client"
|
||||||
|
"md.obsidian.Obsidian"
|
||||||
|
"org.qbittorrent.qBittorrent"
|
||||||
|
"com.bitwarden.desktop"
|
||||||
|
"org.inkscape.Inkscape"
|
||||||
|
"us.zoom.Zoom"
|
||||||
|
"org.audacityteam.Audacity"
|
||||||
|
"org.remmina.Remmina"
|
||||||
|
"com.getpostman.Postman"
|
||||||
|
"com.jeffser.Alpaca"
|
||||||
|
"io.dbeaver.DBeaverCommunity"
|
||||||
|
"com.github.iwalton3.jellyfin-media-player"
|
||||||
|
"app.zen_browser.zen"
|
||||||
|
"org.localsend.localsend_app"
|
||||||
|
"com.visualstudio.code"
|
||||||
|
"io.beekeeperstudio.Studio"
|
||||||
|
"org.gnome.Boxes"
|
||||||
|
"com.vscodium.codium"
|
||||||
|
"net.scribus.Scribus"
|
||||||
|
"im.fluffychat.Fluffychat"
|
||||||
|
"org.gnome.Evolution"
|
||||||
|
"com.github.xournalpp.xournalpp"
|
||||||
|
"org.libretro.RetroArch"
|
||||||
|
)
|
||||||
|
|
||||||
|
for pak in "${FLATPAKS[@]}"; do
|
||||||
|
if ! flatpak list | grep -i "$pak" &> /dev/null; then
|
||||||
|
echo "Installing Flatpak: $pak"
|
||||||
|
flatpak install --noninteractive "$pak"
|
||||||
|
else
|
||||||
|
echo "Flatpak already installed: $pak"
|
||||||
|
fi
|
||||||
|
done
|
||||||
17
install-kickstart-nvim.sh
Executable file
17
install-kickstart-nvim.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
NVIM_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/nvim"
|
||||||
|
NVIM_DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/nvim"
|
||||||
|
|
||||||
|
# Check if kickstart.nvim is already installed
|
||||||
|
if [ -d "$NVIM_CONFIG_DIR" ]; then
|
||||||
|
echo "Neovim config already exists at $NVIM_CONFIG_DIR"
|
||||||
|
else
|
||||||
|
echo "Installing kickstart.nvim..."
|
||||||
|
rm -rf "$NVIM_DATA_DIR"
|
||||||
|
git clone https://github.com/nvim-lua/kickstart.nvim.git "$NVIM_CONFIG_DIR"
|
||||||
|
echo "Done. Launch nvim to complete plugin installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
54
install-mise-ruby-rails.sh
Executable file
54
install-mise-ruby-rails.sh
Executable file
@@ -0,0 +1,54 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# set -e
|
||||||
|
|
||||||
|
#====================================================================================
|
||||||
|
# Install Mise
|
||||||
|
#====================================================================================
|
||||||
|
|
||||||
|
# Check if Mise is already installed
|
||||||
|
if ! command -v mise &> /dev/null; then
|
||||||
|
echo "Installing Mises"
|
||||||
|
curl https://mise.run/bash | sh
|
||||||
|
else
|
||||||
|
echo "Mises is installed"
|
||||||
|
fi
|
||||||
|
|
||||||
|
eval "$($HOME/.local/bin/mise activate bash)"
|
||||||
|
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
|
#====================================================================================
|
||||||
|
# Install Ruby
|
||||||
|
#====================================================================================
|
||||||
|
|
||||||
|
# Check if Ruby is already installed
|
||||||
|
if ! command -v ruby &> /dev/null; then
|
||||||
|
echo "Installing Ruby"
|
||||||
|
mise install ruby@latest
|
||||||
|
mise use -g ruby@latest
|
||||||
|
|
||||||
|
# Explicitly add shims to PATH
|
||||||
|
export PATH="$HOME/.local/share/mise/shims:$PATH"
|
||||||
|
|
||||||
|
# Force reshim
|
||||||
|
$HOME/.local/bin/mise reshim
|
||||||
|
|
||||||
|
source "$HOME/.bashrc"
|
||||||
|
|
||||||
|
gem install bundler
|
||||||
|
else
|
||||||
|
echo "Ruby is installed"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#====================================================================================
|
||||||
|
# Install Rails
|
||||||
|
#====================================================================================
|
||||||
|
|
||||||
|
# Check if Rails is already installed
|
||||||
|
if ! command -v rails &> /dev/null; then
|
||||||
|
echo "Installing Rails"
|
||||||
|
gem install rails
|
||||||
|
else
|
||||||
|
echo "Rails is installed"
|
||||||
|
fi
|
||||||
22
install-tpm.sh
Executable file
22
install-tpm.sh
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if ! pacman -Q tmux &>/dev/null; then
|
||||||
|
echo "tmux is not installed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
TPM_DIR="$HOME/.tmux/plugins/tpm"
|
||||||
|
|
||||||
|
# Check if TPM is already installed
|
||||||
|
if [ -d "$TPM_DIR" ]; then
|
||||||
|
echo "TPM is already installed in $TPM_DIR"
|
||||||
|
else
|
||||||
|
echo "Installing Tmux Plugin Manager (TPM)..."
|
||||||
|
git clone https://github.com/tmux-plugins/tpm $TPM_DIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "TPM installed successfully!"
|
||||||
|
|
||||||
|
|
||||||
201
install.sh
Executable file
201
install.sh
Executable file
@@ -0,0 +1,201 @@
|
|||||||
|
#!/bin/bash -i
|
||||||
|
#
|
||||||
|
# Purpose : CoreDesktop installer
|
||||||
|
|
||||||
|
# Print the logo
|
||||||
|
print_logo() {
|
||||||
|
cat << "EOF"
|
||||||
|
|
||||||
|
██
|
||||||
|
█ ██
|
||||||
|
██ ██████ █████ ██ █████ █████ ████ ██ █████ ██
|
||||||
|
██ ██ ██ ███ ███████ ██ ██ ██ ██ ██ ████████ ██ ██ ███████
|
||||||
|
█████ ██████ ██ ██ ██████ ██ ████████ ██ █ ███████ ██ ██
|
||||||
|
██ ██████ ███████ ██████ ██ ██████ ██████ ██████ ███████
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear screen and show logo
|
||||||
|
clear
|
||||||
|
print_logo
|
||||||
|
cd
|
||||||
|
|
||||||
|
# Exit on any error
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Ask for sudo password upfront so subsequent sudo calls don't prompt mid-install
|
||||||
|
sudo -v
|
||||||
|
|
||||||
|
# Ensure git is available before attempting to clone anything
|
||||||
|
if ! command -v git &> /dev/null; then
|
||||||
|
echo "Installing git..."
|
||||||
|
sudo pacman -S git --noconfirm
|
||||||
|
else
|
||||||
|
echo "git is installed."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clone the latest CoreDesktop repo into the standard data directory
|
||||||
|
echo "Getting the latest version of CoreDesktop..."
|
||||||
|
rm -rf ~/.local/share/coredesktop
|
||||||
|
git clone https://gitea.young.computer/david/coredesktop.git ~/.local/share/coredesktop > /dev/null
|
||||||
|
|
||||||
|
# Install the corerefresh and coreupdate management scripts to the user's bin
|
||||||
|
mkdir -p ~/.local/bin
|
||||||
|
sudo cp ~/.local/share/coredesktop/corerefresh ~/.local/bin/corerefresh
|
||||||
|
sudo cp ~/.local/share/coredesktop/coreupdate ~/.local/bin/coreupdate
|
||||||
|
|
||||||
|
cd ~/.local/share/coredesktop
|
||||||
|
|
||||||
|
# Source utility functions (provides install_packages and other helpers)
|
||||||
|
source utils.sh
|
||||||
|
|
||||||
|
# Source the package list (defines SYSTEM_UTILS, DEV_TOOLS, DESKTOP, etc. arrays)
|
||||||
|
if [ ! -f "packages.conf" ]; then
|
||||||
|
echo "Error: packages.conf not found!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
source packages.conf
|
||||||
|
|
||||||
|
echo "Starting full system setup..."
|
||||||
|
|
||||||
|
# Bring the system fully up to date before installing anything new
|
||||||
|
echo "Updating system..."
|
||||||
|
sudo pacman -Syu --noconfirm
|
||||||
|
|
||||||
|
cd ~/
|
||||||
|
|
||||||
|
# Install yay AUR helper if not present — required for AUR packages installed later
|
||||||
|
if ! command -v yay &> /dev/null; then
|
||||||
|
echo "Installing yay AUR helper..."
|
||||||
|
sudo pacman -S --needed git base-devel --noconfirm
|
||||||
|
if [[ -d "yay" ]]; then
|
||||||
|
echo "yay directory already exists, removing it..."
|
||||||
|
rm -rf yay
|
||||||
|
fi
|
||||||
|
echo "Cloning yay repository..."
|
||||||
|
git clone https://aur.archlinux.org/yay.git
|
||||||
|
cd yay
|
||||||
|
echo "Building yay..."
|
||||||
|
makepkg -si --noconfirm
|
||||||
|
cd ..
|
||||||
|
rm -rf yay
|
||||||
|
else
|
||||||
|
echo "yay is already installed."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install packages grouped by category as defined in packages.conf
|
||||||
|
echo "Installing system utilities..."
|
||||||
|
install_packages "${SYSTEM_UTILS[@]}"
|
||||||
|
|
||||||
|
echo "Installing development tools..."
|
||||||
|
install_packages "${DEV_TOOLS[@]}"
|
||||||
|
|
||||||
|
echo "Installing system maintenance tools..."
|
||||||
|
install_packages "${MAINTENANCE[@]}"
|
||||||
|
|
||||||
|
echo "Installing desktop environment..."
|
||||||
|
install_packages "${DESKTOP[@]}"
|
||||||
|
|
||||||
|
echo "Installing office packages..."
|
||||||
|
install_packages "${OFFICE[@]}"
|
||||||
|
|
||||||
|
echo "Installing media packages..."
|
||||||
|
install_packages "${MEDIA[@]}"
|
||||||
|
|
||||||
|
echo "Installing fonts..."
|
||||||
|
install_packages "${FONTS[@]}"
|
||||||
|
|
||||||
|
# Enable all systemd services listed in SERVICES array, then register the SSH
|
||||||
|
# Avahi service so the machine is discoverable over mDNS
|
||||||
|
echo "Configuring services..."
|
||||||
|
for service in "${SERVICES[@]}"; do
|
||||||
|
if ! systemctl is-enabled "$service" &> /dev/null; then
|
||||||
|
echo "Enabling $service..."
|
||||||
|
sudo systemctl enable "$service"
|
||||||
|
else
|
||||||
|
echo "$service is already enabled."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
sudo cp /usr/share/doc/avahi/ssh.service /etc/avahi/services/
|
||||||
|
|
||||||
|
cd ~/.local/share/coredesktop
|
||||||
|
|
||||||
|
# Install GNOME shell extensions via the dedicated script
|
||||||
|
echo "Installing GNOME extensions..."
|
||||||
|
. gnome/gnome-extensions.sh
|
||||||
|
|
||||||
|
# Install Flatpak apps — some programs run better sandboxed as Flatpaks
|
||||||
|
echo "Installing flatpaks..."
|
||||||
|
. install-flatpaks.sh
|
||||||
|
|
||||||
|
# Install TPM (Tmux Plugin Manager) and configured plugins
|
||||||
|
echo "Installing tmux plug-in manager..."
|
||||||
|
. install-tpm.sh
|
||||||
|
|
||||||
|
# Install Mise version manager, then use it to set up Ruby and Rails
|
||||||
|
echo "Installing Mise, Ruby, Rails..."
|
||||||
|
cd ~/.local/share/coredesktop
|
||||||
|
. install-mise-ruby-rails.sh
|
||||||
|
|
||||||
|
# Install Kickstart Neovim config as the default Neovim configuration
|
||||||
|
echo "Installing Kickstart Neovim..."
|
||||||
|
. install-kickstart-nvim.sh
|
||||||
|
|
||||||
|
# Add the current user to the docker group and start the Docker daemon
|
||||||
|
sudo usermod -aG docker $USER
|
||||||
|
newgrp docker
|
||||||
|
sudo systemctl enable docker.service
|
||||||
|
sudo systemctl start docker.service
|
||||||
|
|
||||||
|
# Apply GNOME dconf settings only if the settings file has changed since last run
|
||||||
|
# (tracked via an MD5 checksum to avoid redundant writes)
|
||||||
|
SRC="$HOME/.local/share/coredesktop/gnome/gnome-settings.dconf"
|
||||||
|
CHECKSUM_FILE="$HOME/.local/share/coredesktop/gnome/.gnome-settings.md5"
|
||||||
|
|
||||||
|
if [ ! -f "$SRC" ]; then
|
||||||
|
echo "Error: $SRC not found, exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
CURRENT_SUM=$(md5sum "$SRC" | awk '{print $1}')
|
||||||
|
|
||||||
|
if [ -f "$CHECKSUM_FILE" ]; then
|
||||||
|
STORED_SUM=$(cat "$CHECKSUM_FILE")
|
||||||
|
else
|
||||||
|
STORED_SUM=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CURRENT_SUM" != "$STORED_SUM" ]; then
|
||||||
|
echo "GNOME settings have changed, applying..."
|
||||||
|
dconf load /org/gnome/shell/extensions/ < "$SRC"
|
||||||
|
echo "$CURRENT_SUM" > "$CHECKSUM_FILE"
|
||||||
|
echo "Done."
|
||||||
|
else
|
||||||
|
echo "GNOME settings unchanged, skipping."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fix mDNS configuration if systemd-resolved is managing DNS on this system
|
||||||
|
if systemctl is-enabled systemd-resolved.service &> /dev/null; then
|
||||||
|
echo "systemd-resolved is enabled, applying mDNS fix..."
|
||||||
|
bash ~/.local/share/coredesktop/fixmdns.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check whether the running kernel matches the installed modules — if not, a
|
||||||
|
# newer kernel was installed during this run and a reboot is required
|
||||||
|
if ! ls /usr/lib/modules/$(uname -r) > /dev/null 2>&1; then
|
||||||
|
echo "A newer kernel has been installed, a reboot is recommended."
|
||||||
|
read -rp "Reboot now? [y/N] " response
|
||||||
|
case "$response" in
|
||||||
|
[yY][eE][sS]|[yY])
|
||||||
|
echo "Rebooting..."
|
||||||
|
sudo reboot
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Reboot skipped. Please remember to reboot when convenient."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "Kernel is up to date, no reboot needed. You may want to consider a reboot if other significant software was updated or installed."
|
||||||
|
fi
|
||||||
2
networking/mdns.allow
Normal file
2
networking/mdns.allow
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
.local.
|
||||||
|
.local
|
||||||
19
networking/nsswitch.conf
Normal file
19
networking/nsswitch.conf
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Name Service Switch configuration file.
|
||||||
|
# See nsswitch.conf(5) for details.
|
||||||
|
|
||||||
|
passwd: files systemd
|
||||||
|
group: files [SUCCESS=merge] systemd
|
||||||
|
shadow: files systemd
|
||||||
|
gshadow: files systemd
|
||||||
|
|
||||||
|
publickey: files
|
||||||
|
|
||||||
|
hosts: mymachines mdns [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns
|
||||||
|
networks: files
|
||||||
|
|
||||||
|
protocols: files
|
||||||
|
services: files
|
||||||
|
ethers: files
|
||||||
|
rpc: files
|
||||||
|
|
||||||
|
netgroup: files
|
||||||
132
packages.conf
Normal file
132
packages.conf
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
# System utilities
|
||||||
|
SYSTEM_UTILS=(
|
||||||
|
age
|
||||||
|
bluez
|
||||||
|
bluez-utils
|
||||||
|
btop
|
||||||
|
cups
|
||||||
|
cups-pdf
|
||||||
|
curl
|
||||||
|
difftastic
|
||||||
|
eza
|
||||||
|
fastfetch
|
||||||
|
fd
|
||||||
|
fuse
|
||||||
|
fzf
|
||||||
|
gmp
|
||||||
|
gtk3-print-backends
|
||||||
|
htop
|
||||||
|
hyperfine
|
||||||
|
impala
|
||||||
|
jq
|
||||||
|
just
|
||||||
|
lazydocker
|
||||||
|
lazygit
|
||||||
|
libyaml
|
||||||
|
lmstudio-bin
|
||||||
|
lsd
|
||||||
|
lsof
|
||||||
|
man
|
||||||
|
mc
|
||||||
|
mtr
|
||||||
|
neofetch
|
||||||
|
nerdfetch
|
||||||
|
net-tools
|
||||||
|
net-tools
|
||||||
|
networkmanager
|
||||||
|
nmap
|
||||||
|
nss-mdns
|
||||||
|
openssh
|
||||||
|
ripgrep
|
||||||
|
screen
|
||||||
|
socat
|
||||||
|
stow
|
||||||
|
tailscale
|
||||||
|
traceroute
|
||||||
|
tree
|
||||||
|
unzip
|
||||||
|
usbutils
|
||||||
|
vi
|
||||||
|
wget
|
||||||
|
whois
|
||||||
|
xsel
|
||||||
|
zip
|
||||||
|
zlib
|
||||||
|
zoxide
|
||||||
|
)
|
||||||
|
|
||||||
|
# Development tools
|
||||||
|
DEV_TOOLS=(
|
||||||
|
asdf-vm
|
||||||
|
base-devel
|
||||||
|
bat
|
||||||
|
dart-sass
|
||||||
|
docker
|
||||||
|
docker-compose
|
||||||
|
ghostty
|
||||||
|
git
|
||||||
|
go
|
||||||
|
hugo
|
||||||
|
neovim
|
||||||
|
nodejs
|
||||||
|
npm
|
||||||
|
pandoc
|
||||||
|
python-docutils
|
||||||
|
python-myst-parser
|
||||||
|
python-pillow
|
||||||
|
python-pip
|
||||||
|
python-pygments
|
||||||
|
rust
|
||||||
|
starship
|
||||||
|
texlive
|
||||||
|
tmux
|
||||||
|
vim
|
||||||
|
yazi
|
||||||
|
zsh
|
||||||
|
)
|
||||||
|
|
||||||
|
# System maintenance
|
||||||
|
MAINTENANCE=(
|
||||||
|
gnome-disk-utility
|
||||||
|
gnome-extra
|
||||||
|
gnome-keyring
|
||||||
|
)
|
||||||
|
|
||||||
|
# Desktop environment
|
||||||
|
DESKTOP=(
|
||||||
|
#conky-cli
|
||||||
|
element-desktop
|
||||||
|
gnome
|
||||||
|
gnome-tweaks
|
||||||
|
helium-browser-bin
|
||||||
|
kitty
|
||||||
|
libreoffice-fresh
|
||||||
|
steghide
|
||||||
|
winboat-bin
|
||||||
|
)
|
||||||
|
|
||||||
|
# Media packages
|
||||||
|
MEDIA=(
|
||||||
|
flameshot
|
||||||
|
gimp
|
||||||
|
imagemagick
|
||||||
|
mpv
|
||||||
|
sox
|
||||||
|
vlc
|
||||||
|
)
|
||||||
|
|
||||||
|
# Fonts
|
||||||
|
FONTS=(
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-emoji
|
||||||
|
)
|
||||||
|
|
||||||
|
# Services to enable
|
||||||
|
SERVICES=(
|
||||||
|
avahi-daemon.service
|
||||||
|
bluetooth.service
|
||||||
|
cups.service
|
||||||
|
gdm.service
|
||||||
|
NetworkManager.service
|
||||||
|
sshd.service
|
||||||
|
)
|
||||||
28
utils.sh
Executable file
28
utils.sh
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Function to check if a package is installed
|
||||||
|
is_installed() {
|
||||||
|
pacman -Qi "$1" &> /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to check if a package is installed
|
||||||
|
is_group_installed() {
|
||||||
|
pacman -Qg "$1" &> /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to install packages if not already installed
|
||||||
|
install_packages() {
|
||||||
|
local packages=("$@")
|
||||||
|
local to_install=()
|
||||||
|
|
||||||
|
for pkg in "${packages[@]}"; do
|
||||||
|
if ! is_installed "$pkg" && ! is_group_installed "$pkg"; then
|
||||||
|
to_install+=("$pkg")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ${#to_install[@]} -ne 0 ]; then
|
||||||
|
echo "Installing: ${to_install[*]}"
|
||||||
|
yay -S --noconfirm "${to_install[@]}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user