Skip to content

Commit

Permalink
build: carve out common recipe bits
Browse files Browse the repository at this point in the history
  • Loading branch information
yacoob committed Nov 28, 2024
1 parent 5d380d3 commit 44e2533
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 87 deletions.
6 changes: 6 additions & 0 deletions files/scripts/os-release-yaucore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail

sed -i '
/^PRETTY_NAME=/s/uCore/yaucore/
' /usr/lib/os-release
File renamed without changes.
5 changes: 5 additions & 0 deletions recipes/base/chezmoi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# set up chezmoi
type: chezmoi
repository: https://github.com/yacoob/dotfiles
all-users: true
file-conflict-policy: skip
5 changes: 5 additions & 0 deletions recipes/base/files.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# copy contents of files/system/* directly to the target
type: files
files:
- source: system
destination: /
31 changes: 31 additions & 0 deletions recipes/base/rpm-ostree.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# add repositories, install RPM packages
type: rpm-ostree
repos:
- https://copr.fedorainfracloud.org/coprs/atim/bottom/repo/fedora-%OS_VERSION%/atim-bottom-fedora-%OS_VERSION%.repo
- https://copr.fedorainfracloud.org/coprs/atim/lazygit/repo/fedora-%OS_VERSION%/atim-lazygit-fedora-%OS_VERSION%.repo
- https://copr.fedorainfracloud.org/coprs/faramirza/gdu/repo/fedora-%OS_VERSION%/faramirza-gdu-fedora-%OS_VERSION%.repo
- https://repository.mullvad.net/rpm/stable/mullvad.repo
install:
- autorestic
- bat
- difftastic
- direnv
- fd-find
- gh
- git-lfs
- lnav
- ltrace
- neovim
- ripgrep
- strace
- syncthing
- tealdeer
- ugrep
- yq
# third party pkgs
- bottom
- gdu
- lazygit
- mullvad-vpn
optfix:
- Mullvad VPN
4 changes: 4 additions & 0 deletions recipes/base/script.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# run shell scripts
type: script
scripts:
- eget.sh
50 changes: 5 additions & 45 deletions recipes/yaucore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,15 @@ image-version: stable
# NOTE: the order of the modules in this file translates to the order of RUN lines in generated Containerfile.
# Which means, keep the least often modified modules at the top, so the whole thing caches better.
modules:
# set up chezmoi
- type: chezmoi
repository: https://github.com/yacoob/dotfiles
all-users: true
file-conflict-policy: skip

# copy contents of files/system/* directly to the target
- type: files
files:
- source: system
destination: /
- from-file: base/chezmoi.yaml
- from-file: base/files.yaml
- from-file: base/script.yaml
- from-file: base/rpm-ostree.yaml

# run shell scripts
- type: script
scripts:
- eget.sh

# add repositories, install RPM packages
- type: rpm-ostree
repos:
- https://copr.fedorainfracloud.org/coprs/atim/bottom/repo/fedora-%OS_VERSION%/atim-bottom-fedora-%OS_VERSION%.repo
- https://copr.fedorainfracloud.org/coprs/atim/lazygit/repo/fedora-%OS_VERSION%/atim-lazygit-fedora-%OS_VERSION%.repo
- https://copr.fedorainfracloud.org/coprs/faramirza/gdu/repo/fedora-%OS_VERSION%/faramirza-gdu-fedora-%OS_VERSION%.repo
- https://repository.mullvad.net/rpm/stable/mullvad.repo
install:
- ansible
- autorestic
- bat
- difftastic
- direnv
- fd-find
- gh
- git-lfs
- lnav
- ltrace
- neovim
- ripgrep
- strace
- syncthing
- tealdeer
- ugrep
- yq
# third party pkgs
- bottom
- gdu
- lazygit
- mullvad-vpn
optfix:
- Mullvad VPN
- os-release-yaucore.sh

# sign the image
- type: signing
50 changes: 8 additions & 42 deletions recipes/yaurora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@ image-version: stable
# NOTE: the order of the modules in this file translates to the order of RUN lines in generated Containerfile.
# Which means, keep the least often modified modules at the top, so the whole thing caches better.
modules:
# set up chezmoi
- type: chezmoi
repository: https://github.com/yacoob/dotfiles
all-users: true
file-conflict-policy: skip
- from-file: base/chezmoi.yaml
- from-file: base/files.yaml
- from-file: base/script.yaml
- from-file: base/rpm-ostree.yaml

# copy contents of files/system/* directly to the target
- type: files
files:
- source: system
destination: /
# run shell scripts
- type: script
scripts:
- os-release-yaurora.sh

# install flatpaks
- type: default-flatpaks
Expand All @@ -41,49 +39,17 @@ modules:
- org.kde.kcalc
- org.mozilla.Thunderbird

# run shell scripts
- type: script
scripts:
- eget.sh
- os-release.sh

# add repositories, install RPM packages
- type: rpm-ostree
repos:
- https://copr.fedorainfracloud.org/coprs/atim/bottom/repo/fedora-%OS_VERSION%/atim-bottom-fedora-%OS_VERSION%.repo
- https://copr.fedorainfracloud.org/coprs/atim/lazygit/repo/fedora-%OS_VERSION%/atim-lazygit-fedora-%OS_VERSION%.repo
- https://copr.fedorainfracloud.org/coprs/faramirza/gdu/repo/fedora-%OS_VERSION%/faramirza-gdu-fedora-%OS_VERSION%.repo
- https://copr.fedorainfracloud.org/coprs/mdwalters/neovide/repo/fedora-%OS_VERSION%/mdwalters-neovide-fedora-%OS_VERSION%.repo
- https://repository.mullvad.net/rpm/stable/mullvad.repo
install:
- autorestic
- bat
- difftastic
- direnv
- fcitx5
- fcitx5-mozc
- fd-find
- gh
- git-lfs
- kcm-fcitx5
- lnav
- ltrace
- neovim
- ripgrep
- strace
- syncthing
- tealdeer
- trash-cli
- ugrep
- yq
# third party pkgs
- bottom
- gdu
- lazygit
- mullvad-vpn
- neovide
optfix:
- Mullvad VPN

# sign the image
- type: signing

0 comments on commit 44e2533

Please sign in to comment.