Skip to content

A work in progress mkosi configuration around Arch Linux.

Notifications You must be signed in to change notification settings

nurahwolf/moshi

Repository files navigation

moshi

A work in progress mkosi configuration around Arch Linux with the following goals:

  • Bleeding Edge: Using CachyOS and Arch as a base to have the latest and greatest.
  • Modern: Uses some of the newest best practices, such as using UKIs and containers.
  • Secure: Secure Boot, Encrypted, TPM... All that goodness.
  • Legacy Free: No GRUB, no BIOS support. By design.

Thanks

This repository takes insipration from or gives credits to the following projects and resources:

Getting Started

Create incremental builds

If you would like to make a lot of changes, incremental builds are a good idea.

# Generate the default image
mkosi build --output=default
# Make some changes, then use an incremental build
mkosi -i boot

Generate or set a password for root

# For a consistent root password, set the hash
$ touch mkosi.rootpw
$ chmod 600 mkosi.rootpw
$ echo -n hashed: >>mkosi.rootpw
$ openssl passwd -6 >>mkosi.rootpw

# Or, if its one time only, consider setting it within the build image
systemd-nspawn --Image mkosi.output/default
passwd

Generate a basic image, with timestamp

mkosi -f --image-version=$(date --utc +%Y-%m-%d)

Generate a image based on the hash of the repository

mkosi -f --image-version=$(git rev-parse --short=10 HEAD)-$(date --utc +%Y-%m-%d)

On bootup, the image will prompt you to create a user, managed by systemd-homed. If you already have a homed user, copying it to the image should 'just work'. Likewise if you flash an image to bare metal and plug in a homed drive!

# Example for how to generate a systemd-homed user. Image path could be a USB key!
losetup --find --show --sector-size=4096 nurah.img
homectl create nurah --real-name="Nurah Wolfo" [email protected] --shell=/usr/bin/fish --member-of=wheel,libvirt --storage=luks --luks-discard=true --luks-offline-discard=true --uid=60069 --ssh-authorized-keys="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGkFuzdCzeJ2B2KuUmRUTXErvo67RynDL/2/mBq9r+SW Nurah Wolfo <[email protected]> - Primary" --password-hint="Eat my butt" --fs-type=btrfs --image-path /dev/loop0

Create EFI entry to boot

If flashed to bare metal, or used as a VM, consider asking the UEFI to boot the UKI directly, instead of the boot loader.

efibootmgr -c -d /dev/nvme0n1p1 -p 1 -L "Moshi" -l '\EFI\Linux\moshi.efi'

Packages

This project contains a lot of packages that I generally like. Some of them are called out below!

Issues Tracked

  • None for now!

About

A work in progress mkosi configuration around Arch Linux.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages