Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tomrutsaert committed Aug 31, 2024
1 parent 3e97267 commit 33c324d
Show file tree
Hide file tree
Showing 17 changed files with 260 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
matrix:
recipe:
# !! Add your recipes here
- recipe.yml
- recipe-myos-gnome-main.yml
- recipe-myos-gnome-nvidia.yml
steps:
# the build is fully handled by the reusable github action
- name: Build Custom Image
Expand Down
27 changes: 27 additions & 0 deletions files/justfiles/myjust.just
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# vim: set ft=make :
# This file can be modified downstream to add custom just commands

# enable rootless docker for user
enable-rootless-docker-for-user:
#!/usr/bin/bash
/usr/bin/dockerd-rootless-setuptool.sh install
mkdir -p ~/.config/docker/
json='{
"default-address-pools":
[
{"base":"10.2.0.0/16","size":24}
]
}'
echo "$json" | tee -a ~/.config/docker/daemon.json
systemctl stop docker.service
systemctl disable docker.service
systemctl stop docker.socket
systemctl disable docker.socket
systemctl --user enable docker.service
systemctl --user start docker.service
systemctl --user restart docker.service
echo 'export DOCKER_HOST=unix:///run/user/1000/docker.sock' >> ~/.bashrc

add-user-to-groups:
sudo usermod -a -G libvirt $(whoami)
sudo usermod -a -G docker $(whoami)
6 changes: 6 additions & 0 deletions files/system/etc/yum.repos.d/charm.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[charm]
name=Charm
baseurl=https://repo.charm.sh/yum/
enabled=1
gpgcheck=1
gpgkey=https://repo.charm.sh/yum/gpg.key
1 change: 1 addition & 0 deletions files/system/usr/bin/docker-compose
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker compose --compatibility "$@"
91 changes: 91 additions & 0 deletions files/system/usr/etc/bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# /etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile

# It's NOT a good idea to change this file unless you know what you
# are doing. It's much better to create a custom.sh shell script in
# /etc/profile.d/ to make custom changes to your environment, as this
# will prevent the need for merging in future updates.

# Prevent doublesourcing
if [ -z "$BASHRCSOURCED" ]; then
BASHRCSOURCED="Y"

# are we an interactive shell?
if [ "$PS1" ]; then
if [ -z "$PROMPT_COMMAND" ]; then
declare -a PROMPT_COMMAND
case $TERM in
xterm*)
if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
else
PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
fi
;;
screen*)
if [ -e /etc/sysconfig/bash-prompt-screen ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
else
PROMPT_COMMAND='printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
fi
;;
*)
[ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
;;
esac
fi
# Turn on parallel history
shopt -s histappend
# Turn on checkwinsize
shopt -s checkwinsize
# Change the default prompt string
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
# You might want to have e.g. tty in prompt (e.g. more virtual machines)
# and console windows
# If you want to do so, just add e.g.
# if [ "$PS1" ]; then
# PS1="[\u@\h:\l \W]\\$ "
# fi
# to your custom modification shell script in /etc/profile.d/ directory
fi

if ! shopt -q login_shell ; then # We're not a login shell
# Need to redefine pathmunge, it gets undefined at the end of /etc/profile
pathmunge () {
case ":${PATH}:" in
*:"$1":*)
;;
*)
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
esac
}

# Set default umask for non-login shell only if it is set to 0
[ `umask` -eq 0 ] && umask 022

SHELL=/bin/bash
# Only display echos from profile.d scripts if we are no login shell
# and interactive - otherwise just process them to set envvars
for i in /etc/profile.d/*.sh; do
if [ -r "$i" ]; then
if [ "$PS1" ]; then
. "$i"
else
. "$i" >/dev/null
fi
fi
done

unset i
unset -f pathmunge
fi

fi
# vim:ts=4:sw=4
eval "$(starship init bash)"
6 changes: 6 additions & 0 deletions files/system/usr/etc/docker/daemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"default-address-pools":
[
{"base":"10.2.0.0/16","size":24}
]
}
5 changes: 5 additions & 0 deletions recipes/default-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
modules:
- type: files
files:
- source: system
destination: / # copies files/system/* (* means everything inside it) into your image's root folder /
20 changes: 20 additions & 0 deletions recipes/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# installs (rootless) docker
# execute 'ujust enable-rootless-docker-for-user' as end user to finish setup
modules:
- type: rpm-ostree
repos:
- https://download.docker.com/linux/fedora/docker-ce.repo
install:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-buildx-plugin
- docker-compose-plugin
#- fuse-overlayfs
#- iptables-utils
- type: systemd
system:
enabled:
- containerd.service
- docker.service
- docker.socket
17 changes: 17 additions & 0 deletions recipes/flatpaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
modules:
- type: default-flatpaks
notify: true
system:
install:
- com.slack.Slack
- io.dbeaver.DBeaverCommunity
- com.nextcloud.desktopclient.nextcloud
- org.chromium.Chromium
- org.telegram.desktop
- com.spotify.Client
- com.microsoft.Edge
- com.discordapp.Discord
- com.github.tchx84.Flatseal
- it.mijorus.gearlever
- io.missioncenter.MissionCenter
- com.mattjakeman.ExtensionManager
12 changes: 12 additions & 0 deletions recipes/fonts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
modules:
- type: fonts
fonts:
nerd-fonts:
- FiraCode # don't add spaces or "Nerd Font" suffix
- Hack
- Meslo
- RobotoMono
- SourceCodePro
- Terminus
- JetBrainsMono
- NerdFontsSymbolsOnly
7 changes: 7 additions & 0 deletions recipes/gnome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
modules:
- type: gnome-extensions
install:
- 16 # https://extensions.gnome.org/extension/16/auto-move-windows/
- 517 # https://extensions.gnome.org/extension/517/caffeine/
- 1160 # https://extensions.gnome.org/extension/1160/dash-to-panel/
- 2236 # https://extensions.gnome.org/extension/2236/night-theme-switcher/
4 changes: 4 additions & 0 deletions recipes/just.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
modules:
- type: justfiles
include:
- myjust.just
15 changes: 15 additions & 0 deletions recipes/packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
modules:
- type: rpm-ostree
repos:
- https://copr.fedorainfracloud.org/coprs/atim/starship/repo/fedora-%OS_VERSION%/atim-starship-fedora-%OS_VERSION%.repo
install:
- stow
- gum
- starship
- hplip
- solaar
- iotop
- powertop
- btop
- bpftop
- foot
15 changes: 15 additions & 0 deletions recipes/recipe-myos-gnome-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: myos-gnome-main
description: my personal os gnome image
base-image: ghcr.io/ublue-os/silverblue-main
image-version: 40

modules:
- from-file: default-files.yml
- from-file: packages.yml
- from-file: docker.yml
- from-file: virtualization.yml
- from-file: fonts.yml
- from-file: just.yml
- from-file: flatpaks.yml
- from-file: gnome.yml
- type: signing
15 changes: 15 additions & 0 deletions recipes/recipe-myos-gnome-nvidia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: myos-gnome-nvidia
description: my personal os gnome nvidia image
base-image: ghcr.io/ublue-os/silverblue-nvidia
image-version: 40

modules:
- from-file: default-files.yml
- from-file: packages.yml
- from-file: docker.yml
- from-file: virtualization.yml
- from-file: fonts.yml
- from-file: just.yml
- from-file: flatpaks.yml
- from-file: gnome.yml
- type: signing
File renamed without changes.
17 changes: 17 additions & 0 deletions recipes/virtualization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# installs virtualization
modules:
- type: rpm-ostree
install:
- virt-install
- libvirt-daemon-config-network
- libvirt-daemon-kvm
- qemu-kvm
- virt-manager
- virt-viewer
- guestfs-tools
- python3-libguestfs
- virt-top
- type: systemd
system:
enabled:
- libvirtd.service

0 comments on commit 33c324d

Please sign in to comment.