-
-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathexample.butane
More file actions
70 lines (67 loc) · 2.44 KB
/
example.butane
File metadata and controls
70 lines (67 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
variant: fcos
version: 1.6.0
passwd:
users:
- name: core
groups:
- wheel
password_hash: $y$j9T$mefBCJbp/a49aSkTT4hpE1$6BXtrIuV8856t4A9r/R1GW4aR9eKXxsmB8FXt56Hx70 # 'secureblue'
ssh_authorized_keys:
- ssh-ed25519 <key>
storage:
files:
- path: /etc/pki/containers/secureblue-2025.pub
mode: 0644
contents:
inline: |
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdruKsOhUkgdd0lNDHNBymE2Wyb/p
GVnx59QbNoGFbImqZLRVt6uQnO9MfiHU9IZiJl9aNetfAqDsgsltAUQnXQ==
-----END PUBLIC KEY-----
- path: /etc/containers/policy.json
mode: 0644
overwrite: true
contents:
inline: |
{
"default": [{"type": "reject"}],
"transports": {
"docker": {
"ghcr.io/secureblue": [
{
"type": "sigstoreSigned",
"keyPath": "/etc/pki/containers/secureblue-2025.pub",
"signedIdentity": {"type": "matchRepository"}
}
]
}
}
}
- path: /opt/install_secureblue.sh
mode: 0755
contents:
inline: |
sudo systemctl disable --now zincati.service 2>/dev/null
sudo systemctl stop rpm-ostreed-automatic.timer rpm-ostreed-automatic.service 2>/dev/null
echo 'Rebasing to securecore (secureblue CoreOS image)...'
# If you want Nvidia or ZFS support, replace 'securecore-main-hardened' below with
# the name of the image you want. See here for a list of securecore images:
# https://secureblue.dev/images#coreos
sudo rpm-ostree rebase ostree-image-signed:docker://ghcr.io/secureblue/securecore-main-hardened:latest
status=$?
if [ "$status" -ne 0 ]; then
echo "Error: Secureblue installation failed." >&2
exit "$status"
else
sudo cp /usr/etc/containers/policy.json /etc/containers/policy.json
sed -i -e '/\/opt\/install_secureblue.sh/d' /var/home/core/.bash_profile
sudo rm -f /opt/install_secureblue.sh /etc/pki/containers/secureblue-2025.pub
echo "Automatically rebooting in 5 seconds..."
sleep 5
sudo systemctl reboot
fi
- path: /var/home/core/.bash_profile
overwrite: false
append:
- inline: |
/opt/install_secureblue.sh