Coder Social home page Coder Social logo

donovanglover / sakaya Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 0.0 501 KB

Run native wine applications inside declarative systemd-nspawn containers with NixOS.

Home Page: https://donovan.is/sakaya

License: MIT License

Nix 17.19% Rust 82.81%
nixos nixos-container systemd-nspawn wine winetricks linux containers rust

sakaya's Introduction

sakaya

Run native wine applications inside declarative systemd-nspawn containers. sakaya functions as a replacement for wine on the host. Works well with NixOS.

Features

  • 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

Installation

NixOS (Recommended)

Add sakaya to your systemPackages and rebuild.

{ pkgs, ... }:

{
  environment.systemPackages = with pkgs; [
    sakaya
  ];
}

Other distributions

Follow the install guide for Rust. Then, use cargo to install sakaya.

cargo install --git https://github.com/donovanglover/sakaya --tag 0.1.0

Setup

In order to use sakaya, you must first create a nixos-container running the sakaya server.

See containers/default.nix in my nix-config for an example.

Usage

Usage: sakaya [OPTIONS] [FILE] [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

Options:
  -a, --address <ADDRESS>      Address of the server to request [default: 192.168.100.49:39493]
  -d, --directory <DIRECTORY>  Host directory mounted to /mnt inside the container [default: /home/user/containers/wine]
  -w, --wine32 <WINE32>        $WINEPREFIX for 32-bit applications (i386) [default: /mnt/wine32]
  -W, --wine64 <WINE64>        $WINEPREFIX for 64-bit applications (amd64) [default: /mnt/wine64]
  -h, --help                   Print help
  -V, --version                Print version

Contributing

sakaya should be bug free, however contributions are welcome. Although NixOS has first-class support, it should be possible to use sakaya with other distributions as well.

Todo

  • 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

sakaya's People

Contributors

dependabot[bot] avatar donovanglover avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.