Swesbus Lab Manual

Table of Contents

About this manual

This manual is available online. To read it locally, run:

$ lab-help

Obtaining the Lab Manager ISO

From GitHub

The latest Lab Manager ISO can be downloaded from GitHub actions. If the artifact has expired, build a new ISO as explained below.

Building a custom ISO

A custom Lab Manager ISO can be built to modify the default client configuration.

With GitHub Actions

Fork the GitHub repository. Then, modify the default client configuration at hosts/lab-client/configuration.nix. Run the "Build" Action and download its artifact when after it finishes.

With Lab Manager

To copy the current configuration to a local directory, run:

$ cp --dereference --recursive --no-preserve all /etc/nixos swesbus-lab
$ cd swesbus-lab

To edit the client configuration, open hosts/lab-client/configuration.nix in a text editor or run:

$ nano hosts/lab-client/configuration.nix

To build a custom Lab Manager ISO, run:

$ nix build nix build .#lab-manager-iso

The generated ISO can be found at result/iso/.

Using the Lab Manager

The Lab Manager is a bootable ISO that can be used to install thin clients.

Networking

To set up a wireless connection, run:

$ nmtui

Configuration

To copy the current configuration to a local directory, run:

$ cp --dereference --recursive --no-preserve all /etc/nixos swesbus-lab
$ cd swesbus-lab

To edit the client configuration, open hosts/lab-client/configuration.nix in a text editor or run:

$ nano hosts/lab-client/configuration.nix

Partitioning

To list available disks, run:

$ lsblk

To irrevocably erase, format and mount disk /dev/mmcblk0, run:

$ sudo disko --mode destroy,format,mount --flake .#lab-client-1

Installation

To install Lab Client 1 onto the mounted disk, run:

$ sudo nixos-install --flake .#lab-client-1

Wrapping up

To restart the system, run:

$ reboot

To power off the system instead, run:

$ shutdown now

Using the Lab Client

The Lab Client is a thin client that automatically connects to an RDP server. It can be installed using the Lab Manager.

Configuration

To copy the current configuration to a local directory, run:

$ cp --dereference --recursive --no-preserve all /etc/nixos swesbus-lab
$ cd swesbus-lab

To edit the client configuration, open hosts/lab-client/configuration.nix in a text editor or run:

$ nano hosts/lab-client/configuration.nix

To apply the client configuration, run:

$ sudo nixos-rebuild switch --flake .