From d4ec63f0238924ea91e47bfb4a3a459f2e9f1e87 Mon Sep 17 00:00:00 2001 From: Win Date: Fri, 23 May 2025 18:25:32 +0700 Subject: [PATCH] uCore configuration --- ucore-winscloud.bu | 50 +++++++++++++++++++++++++++++++++++++++++++++ ucore-winscloud.ign | 38 ++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 ucore-winscloud.bu create mode 100644 ucore-winscloud.ign diff --git a/ucore-winscloud.bu b/ucore-winscloud.bu new file mode 100644 index 0000000..3c97b9b --- /dev/null +++ b/ucore-winscloud.bu @@ -0,0 +1,50 @@ +variant: fcos +version: 1.4.0 +passwd: + users: + - name: winsdominoes + ssh_authorized_keys: + - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMVzX/hQ3xkrlC3HsHq2cjBdNVQH1A/+Z7JIumI+mg28 winsdominoes@bluefin + password_hash: $y$j9T$LAiUhXMPLuiJHZuAruYjd.$A5SD33aKAxicLEuPw7OHUTq3HyPoAT2NM7sGBjVRQx2 +storage: + directories: + - path: /etc/ucore-autorebase + mode: 0754 +systemd: + units: + - name: ucore-unsigned-autorebase.service + enabled: true + contents: | + [Unit] + Description=uCore autorebase to unsigned OCI and reboot + ConditionPathExists=!/etc/ucore-autorebase/unverified + ConditionPathExists=!/etc/ucore-autorebase/signed + After=network-online.target + Wants=network-online.target + [Service] + Type=oneshot + StandardOutput=journal+console + ExecStart=/usr/bin/rpm-ostree rebase --bypass-driver ostree-unverified-registry:ghcr.io/ublue-os/ucore:stable + ExecStart=/usr/bin/touch /etc/ucore-autorebase/unverified + ExecStart=/usr/bin/systemctl disable ucore-unsigned-autorebase.service + ExecStart=/usr/bin/systemctl reboot + [Install] + WantedBy=multi-user.target + - name: ucore-signed-autorebase.service + enabled: true + contents: | + [Unit] + Description=uCore autorebase to signed OCI and reboot + ConditionPathExists=/etc/ucore-autorebase/unverified + ConditionPathExists=!/etc/ucore-autorebase/signed + After=network-online.target + Wants=network-online.target + [Service] + Type=oneshot + StandardOutput=journal+console + ExecStart=/usr/bin/rpm-ostree rebase --bypass-driver ostree-image-signed:docker://ghcr.io/ublue-os/ucore:stable + ExecStart=/usr/bin/touch /etc/ucore-autorebase/signed + ExecStart=/usr/bin/systemctl disable ucore-signed-autorebase.service + ExecStart=/usr/bin/systemctl reboot + [Install] + WantedBy=multi-user.target diff --git a/ucore-winscloud.ign b/ucore-winscloud.ign new file mode 100644 index 0000000..a6e21e8 --- /dev/null +++ b/ucore-winscloud.ign @@ -0,0 +1,38 @@ +{ + "ignition": { + "version": "3.3.0" + }, + "passwd": { + "users": [ + { + "name": "winsdominoes", + "passwordHash": "$y$j9T$LAiUhXMPLuiJHZuAruYjd.$A5SD33aKAxicLEuPw7OHUTq3HyPoAT2NM7sGBjVRQx2", + "sshAuthorizedKeys": [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMVzX/hQ3xkrlC3HsHq2cjBdNVQH1A/+Z7JIumI+mg28 winsdominoes@bluefin" + ] + } + ] + }, + "storage": { + "directories": [ + { + "path": "/etc/ucore-autorebase", + "mode": 492 + } + ] + }, + "systemd": { + "units": [ + { + "contents": "[Unit]\nDescription=uCore autorebase to unsigned OCI and reboot\nConditionPathExists=!/etc/ucore-autorebase/unverified\nConditionPathExists=!/etc/ucore-autorebase/signed\nAfter=network-online.target\nWants=network-online.target\n[Service]\nType=oneshot\nStandardOutput=journal+console\nExecStart=/usr/bin/rpm-ostree rebase --bypass-driver ostree-unverified-registry:ghcr.io/ublue-os/ucore:stable\nExecStart=/usr/bin/touch /etc/ucore-autorebase/unverified\nExecStart=/usr/bin/systemctl disable ucore-unsigned-autorebase.service\nExecStart=/usr/bin/systemctl reboot\n[Install]\nWantedBy=multi-user.target\n", + "enabled": true, + "name": "ucore-unsigned-autorebase.service" + }, + { + "contents": "[Unit]\nDescription=uCore autorebase to signed OCI and reboot\nConditionPathExists=/etc/ucore-autorebase/unverified\nConditionPathExists=!/etc/ucore-autorebase/signed\nAfter=network-online.target\nWants=network-online.target\n[Service]\nType=oneshot\nStandardOutput=journal+console\nExecStart=/usr/bin/rpm-ostree rebase --bypass-driver ostree-image-signed:docker://ghcr.io/ublue-os/ucore:stable\nExecStart=/usr/bin/touch /etc/ucore-autorebase/signed\nExecStart=/usr/bin/systemctl disable ucore-signed-autorebase.service\nExecStart=/usr/bin/systemctl reboot\n[Install]\nWantedBy=multi-user.target\n", + "enabled": true, + "name": "ucore-signed-autorebase.service" + } + ] + } +}