Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
25 changes: 25 additions & 0 deletions .github/workflows/build-iso.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build ISO
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-iso:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install nix
uses: cachix/install-nix-action@v27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build ISO
run: nix build .#installer
- name: Upload ISO artifact
uses: actions/upload-artifact@v5
with:
name: weallcode-nixos-iso
path: result/iso/*.iso
retention-days: 30
compression-level: 0
18 changes: 18 additions & 0 deletions .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Renovate
on:
schedule:
- cron: "0 5 1 * *"
workflow_dispatch:
jobs:
renovate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Run Renovate
uses: renovatebot/github-action@v46.1.5
with:
configurationFile: renovate.json
token: ${{ secrets.GITHUB_TOKEN }}
env:
RENOVATE_REPOSITORIES: ${{ github.repository }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
weallcode-logon.app/
.direnv
.pre-commit-config.yaml
.ruff_cache
27 changes: 0 additions & 27 deletions .zshrc

This file was deleted.

70 changes: 67 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,69 @@
# laptop
# We All Code - Laptop Setup

```bash
/bin/bash -c "$(curl -fsSL wac.fyi/mac)"
NixOS configuration for classroom laptops (Intel MacBooks).

## Current Software

- XFCE Desktop
- VS Code with extensions:
- Python and Pylance
- Ruff (linter/formatter)
- Prettier
- Firefox
- Python 3 with packages:
- `tkinter`
- `rich`
- [`weallcode-robot`](https://github.com/WeAllCode/tinybit-python) (installed via pip on update)
- git, curl

## Installation Steps

### 1. Download and Flash ISO

Download the ISO from the latest [GitHub Actions build artifact](../../actions/workflows/build-iso.yml). Flash it to a USB drive with `dd` or [Balena Etcher](https://etcher.balena.io/).

### 2. Boot from USB

Shut down the MacBook and insert the USB. Power it on while holding down the **Option** key. Select the USB drive on the boot menu.

### 3. Connect to WiFi

The installer boots into an XFCE desktop. To connect to WiFi open the network connection menu in the system tray. An internet connection is required for setup.

### 4. Install

Double-click the **Classroom Setup** shortcut on the desktop. This partitions the disk and runs `nixos-install` with the classroom flake config. The laptop will reboot when finished — do not remove the USB until the laptop reboots.

## Updating

Each laptop has a **Classroom Update** desktop shortcut. It updates the system to use the latest config on GitHub and upgrades `weallcode-robot` via pip.

## Development

To build a development environment you must install [Nix](https://nixos.org/download/) and [direnv](https://direnv.net/). Then from your `weallcode/laptop` directory run:

```sh
direnv allow
```

This will set up formatting, linting, and pre-commit hooks. You can run `nix fmt` to format all files.

## Project Structure

```
├── flake.nix Entry point
├── modules/
│ ├── base.nix System config
│ ├── disk.nix Partition layout (used by installer and config)
│ ├── iso.nix Installer ISO
│ ├── xfce.nix Classroom desktop environment
│ ├── vscode.nix VS Code extensions and settings
│ ├── python.nix Python interpreter and packages
│ ├── hardware-configuration.nix Boot and kernel modules for Intel MacBooks
│ ├── broadcom.nix Broadcom WiFi driver for Intel MacBooks
│ ├── networkmanager.nix
│ └── nix-settings.nix
└── scripts/
├── machine-setup.py Partition and install - shortcut on installer desktop
└── update.py Update system and weallcode-robot - shortcut on classroom desktop
```
File renamed without changes
172 changes: 172 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading