๐Ÿ”ง Where my dotfiles lives in harmony and peace, most of the time

๐Ÿ—๏ธ Reorganize host configs into hosts/ directory

Amp-Thread-ID: https://ampcode.com/threads/T-019c37d1-e882-706c-a67d-f19bcf991369

+90 -85
+11 -6
Makefile
··· 52 desktop: 53 @ ${DOTFILES}/desktop/setup.sh 54 55 .PHONY: system 56 system: 57 @ $(DOTFILES)/system/setup.sh ··· 60 maintenance: 61 @ ${DOTFILES}/scripts/run-maintenance-tasks 62 63 - .PHONY: laptop 64 - laptop: 65 - @ ${DOTFILES}/laptop/setup.sh 66 67 - .PHONY: workstation 68 - workstation: 69 - @ ${DOTFILES}/workstation/setup.sh 70 71 .PHONY: post-installation 72 post-installation:
··· 52 desktop: 53 @ ${DOTFILES}/desktop/setup.sh 54 55 + .PHONY: ssh 56 + ssh: 57 + @ mkdir -p "$(HOME)/.ssh" 58 + @ ln -sf $(DOTFILES)/ssh/config "$(HOME)/.ssh/config" 59 + 60 .PHONY: system 61 system: 62 @ $(DOTFILES)/system/setup.sh ··· 65 maintenance: 66 @ ${DOTFILES}/scripts/run-maintenance-tasks 67 68 + .PHONY: zephyr 69 + zephyr: 70 + @ ${DOTFILES}/hosts/zephyr/setup.sh 71 72 + .PHONY: helix 73 + helix: 74 + @ ${DOTFILES}/hosts/helix/setup.sh 75 76 .PHONY: post-installation 77 post-installation:
+79
hosts/zephyr/setup.sh
···
··· 1 + #!/usr/bin/env bash 2 + set -euo pipefail 3 + 4 + # Add ASUS Linux repository 5 + echo "Setting up ASUS Linux repository..." 6 + sudo pacman-key --recv-keys 8F654886F17D497FEFE3DB448B15A6B0E9A3FA35 7 + sudo pacman-key --lsign-key 8F654886F17D497FEFE3DB448B15A6B0E9A3FA35 8 + 9 + # Add repository to pacman.conf if not already present 10 + if ! grep -q "\[g14\]" /etc/pacman.conf; then 11 + echo "Adding g14 repository to pacman.conf..." 12 + { 13 + echo "" 14 + echo "[g14]" 15 + echo "Server = https://arch.asus-linux.org" 16 + } | sudo tee -a /etc/pacman.conf > /dev/null 17 + else 18 + echo "Repository g14 found on pacman.conf" 19 + fi 20 + 21 + # Update system 22 + echo "Updating system packages..." 23 + sudo pacman -Suy 24 + 25 + packages=( 26 + brightnessctl 27 + powertop 28 + power-profiles-daemon 29 + plymouth 30 + python-gobject # Required for power-profiles-daemon 31 + asusctl 32 + supergfxctl 33 + rog-control-center 34 + ) 35 + 36 + # Install packages 37 + echo "Installing ASUS packages..." 38 + paru -S --needed --noconfirm "${packages[@]}" 39 + 40 + # Keyboard 41 + echo "Setting keyboard backlight..." 42 + brightnessctl --device=asus::kbd_backlight set 3 43 + 44 + # Power Profiles Daemon 45 + if ! systemctl is-enabled --quiet power-profiles-daemon; then 46 + echo "Enabling Power Profiles Daemon..." 47 + sudo systemctl enable --now power-profiles-daemon 48 + else 49 + echo "Power Profiles Daemon already enabled" 50 + fi 51 + 52 + # SuperGFXD 53 + if ! systemctl is-enabled --quiet supergfxd; then 54 + echo "Enabling SuperGFXD..." 55 + sudo systemctl enable --now supergfxd 56 + else 57 + echo "SuperGFXD already enabled" 58 + fi 59 + 60 + # Switcheroo Control 61 + if ! systemctl is-enabled --quiet switcheroo-control; then 62 + echo "Enabling Switcheroo Control..." 63 + sudo systemctl enable --now switcheroo-control 64 + else 65 + echo "Switcheroo Control already enabled" 66 + fi 67 + 68 + # PowerTOP 69 + echo "Setting up PowerTOP service..." 70 + SCRIPT_DIR=$(dirname "$(realpath "$0")") 71 + sudo cp "${SCRIPT_DIR}/powertop.service" /etc/systemd/system/powertop.service 72 + if ! systemctl is-enabled --quiet powertop.service; then 73 + echo "Enabling PowerTOP service..." 74 + sudo systemctl enable --now powertop.service 75 + else 76 + echo "PowerTOP service already enabled" 77 + fi 78 + 79 + # Optionally, theme Plymouth (https://github.com/adi1090x/plymouth-themes)
laptop/powertop.service hosts/zephyr/powertop.service
-79
laptop/setup.sh
··· 1 - #!/usr/bin/env bash 2 - set -euo pipefail 3 - 4 - # Add ASUS Linux repository 5 - echo "Setting up ASUS Linux repository..." 6 - sudo pacman-key --recv-keys 8F654886F17D497FEFE3DB448B15A6B0E9A3FA35 7 - sudo pacman-key --lsign-key 8F654886F17D497FEFE3DB448B15A6B0E9A3FA35 8 - 9 - # Add repository to pacman.conf if not already present 10 - if ! grep -q "\[g14\]" /etc/pacman.conf; then 11 - echo "Adding g14 repository to pacman.conf..." 12 - { 13 - echo "" 14 - echo "[g14]" 15 - echo "Server = https://arch.asus-linux.org" 16 - } | sudo tee -a /etc/pacman.conf > /dev/null 17 - else 18 - echo "Repository g14 found on pacman.conf" 19 - fi 20 - 21 - # Update system 22 - echo "Updating system packages..." 23 - sudo pacman -Suy 24 - 25 - packages=( 26 - brightnessctl 27 - powertop 28 - power-profiles-daemon 29 - plymouth 30 - python-gobject # Required for power-profiles-daemon 31 - asusctl 32 - supergfxctl 33 - rog-control-center 34 - ) 35 - 36 - # Install packages 37 - echo "Installing ASUS laptop packages..." 38 - paru -S --needed --noconfirm "${packages[@]}" 39 - 40 - # Keyboard 41 - echo "Setting keyboard backlight..." 42 - brightnessctl --device=asus::kbd_backlight set 3 43 - 44 - # Power Profiles Daemon 45 - if ! systemctl is-enabled --quiet power-profiles-daemon; then 46 - echo "Enabling Power Profiles Daemon..." 47 - sudo systemctl enable --now power-profiles-daemon 48 - else 49 - echo "Power Profiles Daemon already enabled" 50 - fi 51 - 52 - # SuperGFXD 53 - if ! systemctl is-enabled --quiet supergfxd; then 54 - echo "Enabling SuperGFXD..." 55 - sudo systemctl enable --now supergfxd 56 - else 57 - echo "SuperGFXD already enabled" 58 - fi 59 - 60 - # Switcheroo Control 61 - if ! systemctl is-enabled --quiet switcheroo-control; then 62 - echo "Enabling Switcheroo Control..." 63 - sudo systemctl enable --now switcheroo-control 64 - else 65 - echo "Switcheroo Control already enabled" 66 - fi 67 - 68 - # PowerTOP 69 - echo "Setting up PowerTOP service..." 70 - DOTFILES=$(dirname "$(dirname "$(realpath "$0")")") 71 - sudo cp "${DOTFILES}"/laptop/powertop.service /etc/systemd/system/powertop.service 72 - if ! systemctl is-enabled --quiet powertop.service; then 73 - echo "Enabling PowerTOP service..." 74 - sudo systemctl enable --now powertop.service 75 - else 76 - echo "PowerTOP service already enabled" 77 - fi 78 - 79 - # Optionally, theme Plymouth (https://github.com/adi1090x/plymouth-themes)
···
workstation/setup.sh hosts/helix/setup.sh