update for mkosi 20

This commit is contained in:
Miraty 2024-01-25 10:53:45 +01:00
parent 13348b1662
commit 5b4e45f5e1
5 changed files with 12 additions and 15 deletions

View file

@ -1,25 +1,25 @@
# ServNest system images generator
This is the sources to build system images of ServNest using mkosi. You can then use them with systemd-nspawn.
This is the sources to build system images of ServNest using mkosi 20. You can then use them with systemd-nspawn.
This repository also contains configuration files and installation scripts inside `install` that may also be useful without mkosi.
This repository also contains configuration files and installation scripts inside `install` that may also be useful for the manual installation process, without mkosi.
## Usage
This generator allows to build images for both Arch Linux and Debian Testing, you can replace `<sysid>` by either `arch` or `debian` in the following examples. Note that mkosi may require tools that are not available on your distribution.
This generator allows to build images for both Arch Linux and Debian Testing, you can replace `<sysid>` by either `sn-arch` or `sn-debian` in the following examples. Note that mkosi may require tools that are not available on your distribution.
First:
- Put your SSH public key in `root/.ssh/authorized_keys`
- Put a SFTPGo binary as `usr/local/bin/sftpgo`
- Put your SSH public key in `mkosi.extra/root/.ssh/authorized_keys`
- Put a SFTPGo binary as `mkosi.extra/usr/local/bin/sftpgo`
You can generate a new image in `/var/lib/machines/servnest-<sysid>` by running `mkosi --force -d <sysid>` from this repository (`--force` erases an already existing image).
You can generate a new image in `/var/lib/machines/<sysid>` by running `mkosi --force --image <sysid> build` from this repository (`--force` erases an already existing image).
You need to copy `mkosi.nspawn` into `/etc/systemd/nspawn/servnest-<sysid>.nspawn` to allow the container to use network without restrictions.
You need to copy `mkosi.nspawn` into `/etc/systemd/nspawn/<sysid>.nspawn` to allow the container to use network without restrictions.
You can then boot the container:
```shell
machinectl start servnest-<sysid>
machinectl shell servnest-<sysid>
machinectl start <sysid>
machinectl shell <sysid>
```
The full explanation of the structure in this repository can be found on the mkosi manpage. Here is a summary of what mkosi will do in this repository:

View file

@ -1,13 +1,11 @@
[Validation]
Autologin = yes
[Output]
Format = directory
Hostname = servnest.test
CacheDirectory = ../mkosi.cache/
OutputDirectory = /var/lib/machines
[Content]
Autologin = yes
Hostname = servnest.test
WithDocs = yes
WithNetwork = yes
Packages =

@ -1 +1 @@
Subproject commit 63554b4908a088f5da0dc3a5806415cfa7b88701
Subproject commit 808de3fdbfb87630970ddcdb49cfd14c7ba3c127

View file

@ -13,7 +13,6 @@ Packages =
knot-dnsutils
knot-dnssecutils
php-sqlite3
golang-1.19
openssh-server
iputils-ping
gettext