Skip to content

Commit 733d81d

Browse files
committed
feat(linux): kinoite setup
1 parent 1c9d52e commit 733d81d

4 files changed

+94
-0
lines changed

Pakfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
org.videolan.VLC
2+
org.wezfurlong.wezterm
3+
com.bktus.gpgfrontend
4+
com.brave.Browser
5+
com.transmissionbt.Transmission

Pakfile.pers.asc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-----BEGIN PGP MESSAGE-----
2+
3+
hF4Da2Cg5+3SSjESAQdABrGyHAQxWKjXJG81SASvFp95VZTI4NzUhwjy6EcQcEUw
4+
4EeZR4y6dXCCj0Rzxe1LI5FSptNaw9NH6lJ6rvz/ujaDM/Eoh63HoDn+vz9sqmx0
5+
0nABaBXfon3Iz5F24rUGgdVnjpbVmA7oGy7XvEPZLRWx3jPze98RoihgNTzWknSG
6+
B8dcxjidFFHZfwC8cu/+99bgRcCcwpo1dQujm+gVGBttWUafZDL+3ZU20/iEe5sI
7+
WZ2UP3EM/5SD2Ng/hAQv8QBt
8+
=joNx
9+
-----END PGP MESSAGE-----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{ if (eq .chezmoi.os "linux") -}}
2+
#!/bin/bash
3+
4+
# Check if Oh My Zsh is installed
5+
if [ ! -d "$HOME/.oh-my-zsh" ]; then
6+
# Install Oh My Zsh
7+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
8+
fi
9+
10+
# switching shell for current user
11+
current_shell=$(getent passwd $LOGNAME | cut -d: -f7)
12+
if [[ "$current_shell" != "/bin/zsh" ]]; then
13+
chsh -s $(which zsh)
14+
fi
15+
16+
# ---------------------------------------------------------------------------------------------------------------------
17+
# GPG settings
18+
# ---------------------------------------------------------------------------------------------------------------------
19+
gpg-connect-agent reloadagent /bye
20+
21+
{{ end -}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{{ if (eq .chezmoi.os "linux") -}}
2+
#!/bin/bash
3+
set -eu
4+
5+
install_flatpaks() {
6+
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
7+
8+
local flatpaks=(
9+
{{ joinPath .chezmoi.sourceDir "Pakfile" | include }}
10+
{{ joinPath .chezmoi.sourceDir "Pakfile.pers.asc" | include | decrypt }}
11+
)
12+
13+
flatpak install -y flathub "${flatpaks[@]}"
14+
}
15+
16+
install_ostree() {
17+
# setting up non-rh repos
18+
# https://code.visualstudio.com/docs/setup/linux#_rhel-fedora-and-centos-based-distributions
19+
if [ ! -f /etc/pki/rpm-gpg/microsoft.asc ]; then
20+
curl -o /etc/pki/rpm-gpg/microsoft.asc https://packages.microsoft.com/keys/microsoft.asc
21+
fi
22+
if [ ! -f /etc/yum.repos.d/vscode.repo ]; then
23+
echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null
24+
fi
25+
26+
rpm-ostree install --idempotent -y \
27+
binutils \
28+
podman-docker \
29+
zsh \
30+
ddccontrol ddccontrol-gtk \
31+
vim \
32+
wl-clipboard \
33+
code
34+
sudo rpm-ostree apply-live
35+
}
36+
37+
setup_toolbx() {
38+
if ! toolbox list -c | grep -q "ubuntu-toolbox-23.10"; then
39+
toolbox create --distro ubuntu --release 23.10
40+
fi
41+
}
42+
43+
{{ if (eq .chezmoi.osRelease.variantID "kinoite") -}}
44+
install_ostree
45+
install_flatpaks
46+
setup_toolbx
47+
48+
if [ ! -f ~/bin/git-credential-github ]; then
49+
# Download and extract git-credential-github
50+
mkdir -p /tmp/git-credential-github
51+
curl -L https://github.com/Xgames123/git-credential-github/releases/download/2.2.0/git-credential-github-2.2.0.deb -o /tmp/git-credential-github/git-credential-github-2.2.0.deb
52+
ar x /tmp/git-credential-github/git-credential-github-2.2.0.deb --output /tmp/git-credential-github
53+
tar -xf /tmp/git-credential-github/data.tar.xz -C /tmp/git-credential-github
54+
cp /tmp/git-credential-github/usr/bin/git-credential-github ~/bin/
55+
fi
56+
57+
{{ end -}}
58+
59+
{{ end -}}

0 commit comments

Comments
 (0)