Skip to content
A custom Linux system for running Dividat Play.
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.git-crypt
bootloader
controller
deployment/deploy-playos-update
docs
installer
kiosk
live
nixpkgs
pkgs
pki
rauc-bundle
system
testing
.gitignore
Changelog.md
LICENSE
Makefile
Readme.md
default.nix

Readme.md

PlayOS

A custom Linux system (NixOS) for running Dividat Play.

See the documentation for more information.

Quick start

Running nix build will create following (in result/):

  • bin/: Tools
  • playos-VERSION-UNSIGNED.raucb: RAUC bundle that can be used to update systems. Note that it is signed with a dummy development key. Real deployments would resign the bundle with rauc resign.
  • playos-installer-VERSION.iso: Bootable ISO image that can install the system.
  • disk.img: Preinstalled disk with bootloader, system partitions A/B and data partitions for testing (but without test instrumentation).

For quicker development cycles you may pass following arguments to the build:

  • buildInstaller: Should the installer ISO image be built.
  • buildBundle: Should the RAUC bundle be built.
  • buildDisk: Should the preinstalled disk image be built.
  • buildLive: Should the PlayOS live system image be built.

For example: nix build --arg buildInstaller false --arg buildBundle false will only build the system toplevels and the preinstalled disk image.

A virtual machine (with test instrumentation) can be started without any of the above builds.

Virtual machine

A helper is available to quickly start a virtual machine:

nix build && ./result/bin/run-playos-in-vm

See the output of run-playos-in-vm --help for more information.

Deployment

Update bundles are hosted on Amazon S3. The script bin/deploy-playos-update will handle signing and uploading of bundle.

The arguments updateUrl (from where updates will be fetched by PlayOS systems), deployURL (where bundles should be deployed to) must be specified. For example: nix build --arg updateUrl https://dist.dividat.com/releases/playos/master/ --arg deployUrl s3://dist.dividat.ch/releases/playos/master/.

Commonly used update and deploy URLs (channels) can be used with shortcuts defined in the Makefile.

To release an update to the develop channel:

make develop
./result/bin/deploy-playos-update --key PATH_TO_KEY.pem

Key switch

When switching key pairs on a channel, the new certficiate must be built into the bundle, which must then be signed with the old key. For this purpose, the --override-cert option of the deploy script is needed to provide RAUC with a certificate matching the new key.

Related work

  • Yocto: A builder for embedded Linux distributions. Widely used but not very well suited for desktop functionality (such as browser).
  • Buildroot: Builder for embedded Linux systems. Also not very well suited for desktop functionality.
  • not-os: A NixOS based system generator. Much more minimal than NixOS, does not use systemd and is not compatible with existing NixOS modules.

Attribution

This software contains portions from other open-source projects.

nixpkgs

Copyright (c) 2003-2018 Eelco Dolstra and the Nixpkgs/NixOS contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Feather

The MIT License (MIT)

Copyright (c) 2013-2017 Cole Bemis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You can’t perform that action at this time.