Skip to content

Commit

Permalink
Refactor recipes for reusability
Browse files Browse the repository at this point in the history
  • Loading branch information
franute committed Dec 16, 2024
1 parent 3290634 commit 1803198
Show file tree
Hide file tree
Showing 9 changed files with 158 additions and 214 deletions.
4 changes: 4 additions & 0 deletions recipes/autofirma.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
modules:
- type: script
scripts:
- install_autofirma.sh
23 changes: 23 additions & 0 deletions recipes/common-flatpak.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
modules:
- type: default-flatpaks
notify: true # Send notification after install/uninstall is finished (true/false)
system:
# If no repo information is specified, Flathub will be used by default
# repo-url: https://dl.flathub.org/repo/flathub.flatpakrepo
# repo-name: flathub
# repo-title: "Flathub (system-wide)" # Optional; this sets the remote's user-facing name in graphical frontends like GNOME Software
install:
- com.github.tchx84.Flatseal
- com.mattjakeman.ExtensionManager
- de.haeckerfelix.Fragments
- io.gitlab.adhami3310.Impression
- net.nokyan.Resources
- org.gnome.Calculator
- org.gnome.Calendar
- org.gnome.Characters
- org.gnome.Contacts
- org.gnome.Logs
- org.gnome.Loupe
- org.gnome.TextEditor
- org.gnome.Showtime
- org.libreoffice.LibreOffice
23 changes: 23 additions & 0 deletions recipes/common-rpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
modules:
- type: rpm-ostree
repos:
- https://copr.fedorainfracloud.org/coprs/atim/ubuntu-fonts/repo/fedora-%OS_VERSION%/atim-ubuntu-fonts-fedora-%OS_VERSION%.repo
install:
- fastfetch
- gnome-shell-extension-appindicator
# all evince related libraries are already installed, don't see the benefit on installing it via flatpak
- evince
# *I think* flatpak simple-scan only works with driverless scanners, probably better to keep it layered
- simple-scan
# additional fonts
- ubuntu-family-fonts
- fira-code-fonts
- cascadia-code-nf-fonts
- java-17-openjdk
remove:
# example: removing firefox (in favor of the flatpak)
# "firefox" is the main package, "firefox-langpacks" is a dependency
# - firefox
# - firefox-langpacks # also remove firefox dependency (not required for all packages, this is a special case)
- virtualbox-guest-additions
- gnome-shell-extension-background-logo
26 changes: 26 additions & 0 deletions recipes/dev-flatpak.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
modules:
- type: default-flatpaks
notify: true # Send notification after install/uninstall is finished (true/false)
system:
# If no repo information is specified, Flathub will be used by default
# repo-url: https://dl.flathub.org/repo/flathub.flatpakrepo
# repo-name: flathub
# repo-title: "Flathub (system-wide)" # Optional; this sets the remote's user-facing name in graphical frontends like GNOME Software
install:
- com.obsproject.Studio
- com.obsproject.Studio.Plugin.Gstreamer
- com.obsproject.Studio.Plugin.GStreamerVaapi
- com.obsproject.Studio.Plugin.OBSVkCapture
- com.spotify.Client
- org.chromium.Chromium
- org.cockpit_project.CockpitClient
- com.discordapp.Discord
- org.gimp.GIMP
- org.gnome.Builder
- org.gnome.Connections
- org.gnome.gitg
- org.gnome.meld
- org.inkscape.Inkscape
- org.kde.kdenlive
- org.pitivi.Pitivi
- org.telegram.desktop
36 changes: 36 additions & 0 deletions recipes/dev-recipe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
modules:
- type: files
files:
- source: system/common
destination: / # copies files/system/* (* means everything inside it) into your image's root folder /

- type: files
files:
- source: system/dev
destination: /

- from-file: common-rpm.yml

- from-file: dev-rpm.yml

- from-file: common-flatpak.yml

- from-file: dev-flatpak.yml

- type: gschema-overrides
include:
- zz1-nimbus.gschema.override

- type: systemd
system:
disabled:
- NetworkManager-wait-online.service
- flatpak-add-fedora-repos.service

- type: chezmoi
repository: "https://codeberg.org/franute/dotfiles"
branch: main
all-users: false
file-conflict-policy: skip

- from-file: autofirma.yml
8 changes: 8 additions & 0 deletions recipes/dev-rpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
modules:
- type: rpm-ostree
repos:
- https://copr.fedorainfracloud.org/coprs/atim/starship/repo/fedora-%OS_VERSION%/atim-starship-fedora-%OS_VERSION%.repo
- https://copr.fedorainfracloud.org/coprs/atim/lazygit/repo/fedora-%OS_VERSION%/atim-lazygit-fedora-%OS_VERSION%.repo
install:
- starship
- lazygit
50 changes: 7 additions & 43 deletions recipes/recipe-home.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# image will be published to ghcr.io/<user>/<name>
name: nimbus-os-home
# description will be included in the image's metadata
description: This is my personal OS image for simple users
description: This is my personal OS image for basic users

# the base image to build on top of (FROM) and the version tag to use
base-image: ghcr.io/ublue-os/silverblue-main
Expand All @@ -21,29 +21,14 @@ modules:
# while putting files in /etc/ is done on booted system by system administrators.
# read more about this in files module reference.

- from-file: common-rpm.yml

- type: rpm-ostree
repos:
- https://copr.fedorainfracloud.org/coprs/atim/ubuntu-fonts/repo/fedora-%OS_VERSION%/atim-ubuntu-fonts-fedora-%OS_VERSION%.repo
install:
- gnome-shell-extension-appindicator
- gnome-shell-extension-dash-to-panel
- gnome-shell-extension-blur-my-shell
# all evince related libraries are already installed, don't see the benefit on installing it via flatpak
- evince
# *I think* flatpak simple-scan only works with driverless scanners, probably better to keep it layered
- simple-scan
# additional fonts
- ubuntu-family-fonts
- fira-code-fonts
- cascadia-code-nf-fonts
- java-17-openjdk
remove:
# example: removing firefox (in favor of the flatpak)
# "firefox" is the main package, "firefox-langpacks" is a dependency
# - firefox
# - firefox-langpacks # also remove firefox dependency (not required for all packages, this is a special case)
- virtualbox-guest-additions
- gnome-shell-extension-background-logo

- from-file: common-flatpak.yml

- type: default-flatpaks
notify: true # Send notification after install/uninstall is finished (true/false)
Expand All @@ -53,26 +38,7 @@ modules:
# repo-name: flathub
# repo-title: "Flathub (system-wide)" # Optional; this sets the remote's user-facing name in graphical frontends like GNOME Software
install:
- org.gnome.Calculator
- org.gnome.Calendar
- org.gnome.Characters
- org.gnome.Contacts
- org.gnome.Loupe
- org.gnome.TextEditor
- org.gnome.Showtime
- com.github.tchx84.Flatseal
- io.gitlab.adhami3310.Impression
- org.libreoffice.LibreOffice
- com.mattjakeman.ExtensionManager
- net.nokyan.Resources
# - org.mozilla.firefox
# - org.gnome.Loupe
# - one.ablaze.floorp//lightning # This is an example of flatpak which has multiple branches in selection (flatpak//branch).
# Flatpak runtimes are not supported (like org.winehq.Wine//stable-23.08),
# only normal flatpak applications are (like Floorp Lightning web browser in this example).
# Installing different branches of the same Flatpak is not supported.
#remove:
# - org.gnome.eog
- com.github.maoschanz.drawing

- type: gschema-overrides
include:
Expand All @@ -84,8 +50,6 @@ modules:
- NetworkManager-wait-online.service
- flatpak-add-fedora-repos.service

- type: script
scripts:
- install_autofirma.sh
- from-file: autofirma.yml

- type: signing # this sets up the proper policy & signing files for signed images to work fully
88 changes: 2 additions & 86 deletions recipes/recipe-nvidia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# image will be published to ghcr.io/<user>/<name>
name: nimbus-os-nvidia
# description will be included in the image's metadata
description: This is my personal OS image.
description: This is my personal OS image with nvidia drivers.

# the base image to build on top of (FROM) and the version tag to use
base-image: ghcr.io/ublue-os/silverblue-nvidia
Expand All @@ -12,90 +12,6 @@ image-version: 41 # latest is also supported if you want new updates ASAP
# module configuration, executed in order
# you can include multiple instances of the same module
modules:
- type: files
files:
- source: system/common
destination: / # copies files/system/* (* means everything inside it) into your image's root folder /

- type: files
files:
- source: system/dev
destination: /

- type: rpm-ostree
repos:
- https://copr.fedorainfracloud.org/coprs/atim/starship/repo/fedora-%OS_VERSION%/atim-starship-fedora-%OS_VERSION%.repo
- https://copr.fedorainfracloud.org/coprs/atim/ubuntu-fonts/repo/fedora-%OS_VERSION%/atim-ubuntu-fonts-fedora-%OS_VERSION%.repo
- https://copr.fedorainfracloud.org/coprs/atim/lazygit/repo/fedora-%OS_VERSION%/atim-lazygit-fedora-%OS_VERSION%.repo
install:
- starship
- fastfetch
- lazygit
- gnome-shell-extension-appindicator
# all evince related libraries are already installed, don't see the benefit on installing it via flatpak
- evince
# *I think* flatpak simple-scan only works with driverless scanners, probably better to keep it layered
- simple-scan
# additional fonts
- ubuntu-family-fonts
- fira-code-fonts
- cascadia-code-nf-fonts
- java-17-openjdk
remove:
# example: removing firefox (in favor of the flatpak)
# "firefox" is the main package, "firefox-langpacks" is a dependency
# - firefox
# - firefox-langpacks # also remove firefox dependency (not required for all packages, this is a special case)
- virtualbox-guest-additions
- gnome-shell-extension-background-logo

- type: default-flatpaks
notify: true # Send notification after install/uninstall is finished (true/false)
system:
# If no repo information is specified, Flathub will be used by default
# repo-url: https://dl.flathub.org/repo/flathub.flatpakrepo
# repo-name: flathub
# repo-title: "Flathub (system-wide)" # Optional; this sets the remote's user-facing name in graphical frontends like GNOME Software
install:
- org.gnome.Calculator
- org.gnome.Calendar
- org.gnome.Characters
- org.gnome.Contacts
- org.gnome.Loupe
- org.gnome.TextEditor
- org.gnome.Showtime
- com.github.tchx84.Flatseal
- io.gitlab.adhami3310.Impression
- org.libreoffice.LibreOffice
- com.mattjakeman.ExtensionManager
- net.nokyan.Resources
# - org.mozilla.firefox
# - org.gnome.Loupe
# - one.ablaze.floorp//lightning # This is an example of flatpak which has multiple branches in selection (flatpak//branch).
# Flatpak runtimes are not supported (like org.winehq.Wine//stable-23.08),
# only normal flatpak applications are (like Floorp Lightning web browser in this example).
# Installing different branches of the same Flatpak is not supported.
#remove:
# - org.gnome.eog

- type: gschema-overrides
include:
- zz1-nimbus.gschema.override

- type: systemd
system:
disabled:
- NetworkManager-wait-online.service
- flatpak-add-fedora-repos.service

- type: chezmoi
repository: "https://codeberg.org/franute/dotfiles"
branch: main
all-users: false
file-conflict-policy: skip

- type: script
scripts:
- install_autofirma.sh
- from-file: dev-recipe.yml

- type: signing # this sets up the proper policy & signing files for signed images to work fully
Loading

0 comments on commit 1803198

Please sign in to comment.