Run native wine applications inside declarative systemd-nspawn containers. sakaya
functions as a replacement for wine
on the host. Works well with NixOS.
- Start multiple wine applications that can interact with each other inside sandboxed systemd-nspawn containers
- Automatically open 32/64-bit wine prefixes based on the executable
- Pass-through
/dri
for native GPU performance inside containers - Prevent sandboxed applications from accessing the internet
NixOS (Recommended)
Add sakaya
to your systemPackages
and rebuild.
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
sakaya
];
}
Follow the install guide for Rust. Then, use cargo to install sakaya.
cargo install --git https://github.com/donovanglover/sakaya --tag 0.1.0
In order to use sakaya, you must first create a systemd-nspawn container running the sakaya server.
See modules/containers.nix
in my nix-config for an example.
Usage: sakaya [OPTIONS] [FILE] [ARGUMENTS]... [COMMAND]
Commands:
server Start a sakaya server instead of a client
help Print this message or the help of the given subcommand(s)
Arguments:
[FILE] Path to the executable to run
[ARGUMENTS]... Arguments to pass to [FILE]
Options:
-a, --address <ADDRESS> Address of the server to request [default: 0.0.0.0:39493]
-d, --directory <DIRECTORY> Host directory mounted to /mnt inside the container (default 3 levels deep to file path)
-w, --wine32 <WINE32> $WINEPREFIX for 32-bit applications (i386) [default: /mnt/wine32]
-W, --wine64 <WINE64> $WINEPREFIX for 64-bit applications (amd64) [default: /mnt/wine64]
-l, --locale <LOCALE> Locale to run programs with [default: ja_JP.UTF-8]
-t, --timezone <TIMEZONE> Timezone to run programs with [default: Asia/Tokyo]
-f, --force64 Force using the 64-bit $WINEPREFIX for 32-bit applications
-h, --help Print help
-V, --version Print version
I have been using sakaya since 2023 and it works well for my use case, however suggestions and improvements are welcome. If you would like to contribute code, you can check your work with cargo clippy
, cargo fmt
, and cargo test
.
- Reduce compile times
- Notify user if sakaya fails to start an executable
- Choose 32/64-bit automatically based on
IMAGE_FILE_32BIT_MACHINE
in the file headers - Automatically run winetricks with sane defaults if prefix does not exist already
- Get .ico and convert to .png? Handle abrupt end of files?
- Write tests
- Terminate sakaya if the server/container cannot be reached
- Create NixOS module to automate systemd service setup for sakaya server
- Automatically register sakaya to executables
- Update format of README
- Kill program inside container when using ctrl+c from host