Skip to content

Set up Nix/NixOS for classroom laptops#17

Open
bottd wants to merge 5 commits intoWeAllCode:mainfrom
bottd:main
Open

Set up Nix/NixOS for classroom laptops#17
bottd wants to merge 5 commits intoWeAllCode:mainfrom
bottd:main

Conversation

@bottd
Copy link
Copy Markdown

@bottd bottd commented Mar 23, 2026

Summary

Replaces the previous scripts for macOS config with a NixOS flake configuration for the classroom laptops (Intel MacBooks).

We ran into issues getting programs to run consistently across these machines, especially because modern versions of MacOS do not support these MacBooks. With Linux we can run an up-to-date system on legacy hardware. NixOS lets us declare the entire system config in code so every laptop is identical.

Omar and I have successfully installed this configuration on the laptops that have USB-A ports. During setup we verified that Python with tkinter runs successfully in VS Code, all VS Code extensions are installed, and AI features are turned off.

Included in this PR:

NixOS system config

  • XFCE desktop

  • WeAllCode wallpaper

  • auto-login

  • Python 3

    • tkinter
    • weallcode_robot
    • rich (used in scripts)
  • VS Code

    • correct Python interpreter path set
    • AI features disabled
    • Ruff
    • Pylance
    • Prettier
  • Firefox

  • Broadcom WiFi driver

Bootable installer ISO

  • GitHub Action builds installation .iso
  • Boots into XFCE with a Classroom Setup shortcut that partitions the disk and installs NixOS

Classroom Update script

  • Desktop shortcut that rebuilds the system from the latest config on GitHub and installs weallcode-robot via pip

Renovate

  • Monthly automated dependency updates for flake inputs and GitHub Actions

Dev environment

  • direnv sets up a dev shell with linting/formatting for nix, python, and yaml.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the classroom laptop setup from macOS bootstrap scripts to a declarative NixOS flake that can be built into both an installable system configuration and a bootable installer ISO for Intel MacBooks.

Changes:

  • Introduces a NixOS flake with modular system configuration (XFCE desktop, VS Code, Python, networking, Broadcom WiFi).
  • Adds a GitHub Actions workflow to build and publish a bootable installer ISO plus a Python-based install/update flow.
  • Adds Renovate + dev tooling (direnv + treefmt/pre-commit), and removes the legacy macOS provisioning artifacts.

Reviewed changes

Copilot reviewed 23 out of 26 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
settings.json Removes legacy macOS VS Code settings bootstrap file.
org.weallcode.logon.plist Removes legacy macOS LaunchAgent.
logon.script.sh Removes legacy macOS logon script.
install.sh Removes legacy macOS installation script.
.zshrc Removes legacy macOS zsh customization.
flake.nix Defines flake inputs, dev tooling (treefmt/pre-commit), and NixOS/ISO outputs.
flake.lock Pins flake inputs for reproducible builds.
modules/base.nix Main classroom NixOS configuration, packages, Home Manager wiring, update shortcut.
modules/disk.nix Disk partitioning layout for disko-based installs.
modules/hardware-configuration.nix Hardware/boot settings targeting Intel MacBooks (incl. Broadcom import).
modules/broadcom.nix Enables Broadcom STA driver and related kernel module settings.
modules/networkmanager.nix Enables NetworkManager and configures system-wide WiFi connection storage.
modules/nix-settings.nix Sets Nix daemon settings, substituters, and GC defaults.
modules/python.nix Provides Python environment (tkinter/rich/pip) for classroom usage and scripts.
modules/vscode.nix Home Manager VS Code config: extensions, interpreter path, AI feature disabling, editor defaults.
modules/xfce.nix XFCE desktop setup: autologin, wallpaper, panel/launcher config.
modules/iso.nix Installer ISO configuration and desktop “Classroom Setup” shortcut.
scripts/machine-setup.py Installer-side script that partitions, installs NixOS from the flake, and reboots.
scripts/update.py Classroom update script that rebuilds from GitHub flake and upgrades weallcode-robot via pip.
README.md Documents new NixOS-based install/update process and repo structure.
.envrc Enables direnv flake-based dev shell.
.gitignore Updates ignored files for direnv/pre-commit/ruff cache.
renovate.json Adds Renovate configuration for monthly dependency updates (incl. Nix).
.github/workflows/build-iso.yml Builds the installer ISO in CI and uploads it as an artifact.
.github/workflows/renovate.yml Runs Renovate on a schedule / manually.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/update.py
Comment thread scripts/machine-setup.py
Comment thread modules/python.nix
Comment thread modules/base.nix
Comment thread modules/iso.nix Outdated
Comment thread modules/vscode.nix
@karbassi
Copy link
Copy Markdown
Member

karbassi commented Apr 3, 2026

@bottd can you look at the reviews from Copilot?

@bottd
Copy link
Copy Markdown
Author

bottd commented Apr 5, 2026

@karbassi I pushed changes to address the comments

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 26 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread renovate.json
Comment thread modules/nix-settings.nix
Comment thread modules/networkmanager.nix Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants