Compare commits
4 Commits
main
...
30a35577af
Author | SHA1 | Date | |
---|---|---|---|
30a35577af
|
|||
1424e13285
|
|||
1babe51e8e
|
|||
d101b7eda6
|
@@ -1,6 +0,0 @@
|
|||||||
# https://github.com/containers/shortnames
|
|
||||||
# ~/.config/containers/registries.conf.d/ai.conf
|
|
||||||
unqualified-search-registries=["git.syui.ai", "docker.io", "ghcr.io"]
|
|
||||||
|
|
||||||
[aliases]
|
|
||||||
"aios"="git.syui.ai/ai/os"
|
|
@@ -2,8 +2,12 @@ name: build and push image
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 12 * * *'
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- '!README.md'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TAG: latest
|
TAG: latest
|
||||||
@@ -17,14 +21,33 @@ jobs:
|
|||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/syui/aios
|
image: syui/aios
|
||||||
options: --privileged
|
options: --privileged
|
||||||
steps:
|
steps:
|
||||||
- name: Initialize
|
- name: Initialize
|
||||||
run: |
|
run: |
|
||||||
pacman -Syuu --noconfirm base-devel archiso docker git curl
|
pacman -Syuu --noconfirm base-devel archiso docker git nodejs bc
|
||||||
docker pull ghcr.io/syui/aios
|
git clone https://gitlab.archlinux.org/archlinux/archiso
|
||||||
docker tag syui/aios ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
cp -rf ./cfg/profiledef.sh /usr/share/archiso/configs/releng/
|
||||||
|
cp -rf ./cfg/profiledef.sh ./archiso/configs/releng/profiledef.sh
|
||||||
|
cp -rf ./cfg/profiledef.sh ./archiso/configs/baseline/profiledef.sh
|
||||||
|
cp -rf ./scpt/mkarchiso ./archiso/archiso/mkarchiso
|
||||||
|
./archiso/archiso/mkarchiso -v -o ./ ./archiso/configs/releng/
|
||||||
|
tar xf aios-bootstrap*.tar.gz
|
||||||
|
mkdir -p root.x86_64/var/lib/machines/arch
|
||||||
|
pacstrap -c root.x86_64/var/lib/machines/arch base
|
||||||
|
echo -e 'Server = http://mirrors.cat.net/archlinux/$repo/os/$arch
|
||||||
|
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pacman.d/mirrorlist
|
||||||
|
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
|
||||||
|
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
|
||||||
|
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
|
||||||
|
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman'
|
||||||
|
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
|
||||||
|
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
|
||||||
|
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
||||||
|
arch-chroot root.x86_64 /bin/sh -c 'git clone https://git.syui.ai/ai/bot && cd bot && cargo build && cp -rf ./target/debug/ai /bin/ && ai ai'
|
||||||
|
tar -zcvf aios-bootstrap.tar.gz root.x86_64/
|
||||||
|
tar -C ./root.x86_64 -c . | docker import - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||||
echo "${{ env.APP_TOKEN }}" | docker login ${{ env.REGISTRY }} -u syui --password-stdin
|
echo "${{ env.APP_TOKEN }}" | docker login ${{ env.REGISTRY }} -u syui --password-stdin
|
||||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
|
||||||
|
|
||||||
|
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -2,8 +2,8 @@ name: release
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
branches:
|
||||||
- 'v*'
|
- main
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -41,7 +41,7 @@ jobs:
|
|||||||
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
|
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
|
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
|
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc'
|
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
|
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
|
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
||||||
|
25
README.md
25
README.md
@@ -53,27 +53,21 @@ $ docker run -it ghcr.io/syui/aios ai
|
|||||||
|
|
||||||
## podman
|
## podman
|
||||||
|
|
||||||
```sh
|
|
||||||
if [ ! -d ~/ai/os/.git ];then
|
|
||||||
mkdir -p ~/ai
|
|
||||||
git clone https://git.syui.ai/ai/os ~/ai/os
|
|
||||||
fi
|
|
||||||
if [ ! -d ~/.config/containers/registries.conf.d ];then
|
|
||||||
mkdir -p ~/.config/containers/registries.conf.d
|
|
||||||
fi
|
|
||||||
ln -s ~/ai/os/.config/containers/registries.conf.d/ai.conf ~/.config/containers/registries.conf.d/ai.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ podman pull aios
|
$ podman pull aios
|
||||||
|
|
||||||
|
$ podman machine init
|
||||||
|
$ podman machine start
|
||||||
```
|
```
|
||||||
|
|
||||||
> ~/.config/containers/registries.conf.d/ai.conf
|
https://github.com/containers/shortnames
|
||||||
|
|
||||||
|
> /etc/containers/registries.conf.d/ai.conf
|
||||||
|
>
|
||||||
|
> ~/.config/containers/registries.conf
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# https://github.com/containers/shortnames
|
unqualified-search-registries = ['docker.io', 'git.syui.ai', 'ghcr.io']
|
||||||
# ~/.config/containers/registries.conf.d/ai.conf
|
|
||||||
unqualified-search-registries = ['git.syui.ai', 'docker.io', 'ghcr.io']
|
|
||||||
|
|
||||||
[aliases]
|
[aliases]
|
||||||
"aios" = "git.syui.ai/ai/os"
|
"aios" = "git.syui.ai/ai/os"
|
||||||
@@ -107,4 +101,3 @@ $ ./scpt/gh-actions.zsh
|
|||||||
|
|
||||||
- https://git.syui.ai/ai/os
|
- https://git.syui.ai/ai/os
|
||||||
- https://github.com/syui/aios
|
- https://github.com/syui/aios
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' >> ./root.x86_64/etc/pa
|
|||||||
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
|
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
|
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
|
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc'
|
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
|
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
|
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
# https://github.com/containers/shortnames
|
unqualified-search-registries = ['docker.io', 'git.syui.ai', 'ghcr.io']
|
||||||
# ~/.config/containers/registries.conf.d/ai.conf
|
|
||||||
unqualified-search-registries = ['git.syui.ai', 'docker.io', 'ghcr.io']
|
|
||||||
|
|
||||||
[aliases]
|
[aliases]
|
||||||
"aios" = "git.syui.ai/ai/os"
|
"aios" = "git.syui.ai/ai/os"
|
||||||
|
@@ -41,7 +41,7 @@ jobs:
|
|||||||
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
|
sed -i s/CheckSpace/#CheckeSpace/ root.x86_64/etc/pacman.conf
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
|
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --init'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
|
arch-chroot root.x86_64 /bin/sh -c 'pacman-key --populate archlinux'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman bc'
|
arch-chroot root.x86_64 /bin/sh -c 'pacman -Syu --noconfirm base base-devel linux vim git zsh rust openssh openssl jq go nodejs docker podman'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
|
arch-chroot root.x86_64 /bin/sh -c 'mkdir -p /etc/containers/registries.conf.d'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
|
arch-chroot root.x86_64 /bin/sh -c 'curl -sL -o /etc/containers/registries.conf.d/ai.conf https://git.syui.ai/ai/os/raw/branch/main/cfg/ai.conf'
|
||||||
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
arch-chroot root.x86_64 /bin/sh -c 'chsh -s /bin/zsh'
|
||||||
|
@@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
pacman -Syuu --noconfirm git base-devel archiso
|
|
||||||
git clone https://gitlab.archlinux.org/archlinux/archiso
|
|
||||||
./archiso/archiso/mkarchiso -v -o ./ ./archiso/configs/releng/
|
|
||||||
mkdir -p work/x86_64/airootfs/var/lib/machines/arch
|
|
||||||
pacstrap -c work/x86_64/airootfs/var/lib/machines/arch base
|
|
||||||
arch-chroot work/x86_64/airootfs/ /bin/sh -c 'pacman-key --init'
|
|
||||||
arch-chroot work/x86_64/airootfs/ /bin/sh -c 'pacman-key --populate archlinux'
|
|
||||||
tar -zcvf archlinux.tar.gz -C work/x86_64/airootfs/ .
|
|
@@ -1,44 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# 変数定義
|
|
||||||
DISK="/dev/sda"
|
|
||||||
HOSTNAME="ai-arch"
|
|
||||||
USERNAME="ai"
|
|
||||||
|
|
||||||
# パーティション作成(自動)
|
|
||||||
parted $DISK mklabel gpt
|
|
||||||
parted $DISK mkpart ESP fat32 1MiB 1GiB
|
|
||||||
parted $DISK set 1 esp on
|
|
||||||
parted $DISK mkpart primary linux-swap 1GiB 5GiB
|
|
||||||
parted $DISK mkpart primary ext4 5GiB 100%
|
|
||||||
|
|
||||||
# ファイルシステム作成
|
|
||||||
mkfs.fat -F32 ${DISK}1
|
|
||||||
mkswap ${DISK}2
|
|
||||||
mkfs.ext4 ${DISK}3
|
|
||||||
|
|
||||||
# マウント
|
|
||||||
mount ${DISK}3 /mnt
|
|
||||||
mkdir -p /mnt/boot
|
|
||||||
mount ${DISK}1 /mnt/boot
|
|
||||||
swapon ${DISK}2
|
|
||||||
|
|
||||||
# インストール
|
|
||||||
pacstrap -K /mnt base linux linux-firmware base-devel vim networkmanager grub efibootmgr
|
|
||||||
|
|
||||||
# 設定
|
|
||||||
genfstab -U /mnt >> /mnt/etc/fstab
|
|
||||||
|
|
||||||
arch-chroot /mnt /bin/bash << EOF
|
|
||||||
ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
|
|
||||||
hwclock --systohc
|
|
||||||
echo "ja_JP.UTF-8 UTF-8" >> /etc/locale.gen
|
|
||||||
locale-gen
|
|
||||||
echo "LANG=ja_JP.UTF-8" > /etc/locale.conf
|
|
||||||
echo "$HOSTNAME" > /etc/hostname
|
|
||||||
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=ARCH
|
|
||||||
grub-mkconfig -o /boot/grub/grub.cfg
|
|
||||||
systemctl enable NetworkManager
|
|
||||||
useradd -m -G wheel $USERNAME
|
|
||||||
EOF
|
|
Reference in New Issue
Block a user