Skip to content

Instantly share code, notes, and snippets.

{
inputs.mixos.url = "github:jmbaur/mixos";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = inputs: {
mixosConfigurations.efiRecovery = inputs.mixos.lib.mixosSystem {
modules = [
{ nixpkgs.nixpkgs = inputs.nixpkgs; }
(
{ config, pkgs, ... }:
@jmbaur
jmbaur / README.md
Created October 20, 2025 00:17
MixOS-based Nix remote builder

MixOS-based Nix Remote Builder

This is an example of how one could build a MixOS-based Nix remote builder machine. This is adapted to work with qemu, with the SSH keys seeded into the machine via qemu's fw_cfg, but could be adapted to a cloud service by whatever cloud-native tooling there is to do the same sort of thing.

  1. ssh-keygen -t ed25519 -C mixos-builder-server -N "" -f /tmp/server_ssh_key
  2. ssh-keygen -t ed25519 -C mixos-builder-client -N "" -f /tmp/client_ssh_key
  3. nix build .#mixosConfigurations.remote-builder.config.system.build.all
  4. qemu-system-x86_64 -nographic -enable-kvm -smp 4 -m 4G -kernel ./result/bzImage -initrd ./result/initrd -append "quiet console=ttyS0,115200" -fw_cfg name=opt/ssh_key,file=/tmp/server_ssh_key -fw_cfg name=opt/authorized_keys_file,file=/tmp/client_ssh_key.pub -device e1000,netdev=net0 -netdev user,id=net0,hostfwd=tcp::8022-:22
  5. nix build nixpkgs#hello -j0 --builders 'ssh-ng://nix@localhost:8022?ssh-key=/tmp/client_ssh_key x86_64-linux - 1 1 nixos-test,benchma
@jmbaur
jmbaur / flash.sh
Created November 21, 2024 15:20
NVIDIA Jetson flash.sh 35.4.1
#!/bin/bash
# Copyright (c) 2011-2023, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
@jmbaur
jmbaur / nixos-linux-config.log
Last active June 13, 2024 21:55
linux kernel kconfig options that don't apply to aarch64
linux-config-aarch64-unknown-linux-gnu> warning: unused option: ACPI_HOTPLUG_CPU
linux-config-aarch64-unknown-linux-gnu> warning: unused option: AGP
linux-config-aarch64-unknown-linux-gnu> warning: unused option: CROS_EC_ISHTP
linux-config-aarch64-unknown-linux-gnu> warning: unused option: CROS_EC_LPC
linux-config-aarch64-unknown-linux-gnu> warning: unused option: DRM_GMA500
linux-config-aarch64-unknown-linux-gnu> warning: unused option: DRM_VBOXVIDEO
linux-config-aarch64-unknown-linux-gnu> warning: unused option: FB_VESA
linux-config-aarch64-unknown-linux-gnu> warning: unused option: HYPERVISOR_GUEST
linux-config-aarch64-unknown-linux-gnu> warning: unused option: IP_MROUTE_MULTIPLE_TABLES
linux-config-aarch64-unknown-linux-gnu> warning: unused option: JOYSTICK_PSXPAD_SPI_FF
May 15 13:16:48 localhost kernel: Linux version 6.8.9 (nixbld@localhost) (gcc (GCC) 13.2.0, GNU ld (GNU Binutils) 2.41) #1-NixOS SMP PREEMPT_DYNAMIC Thu May 2 14:35:35 UTC 2024
May 15 13:16:48 localhost kernel: Command line: init=/nix/store/sylz05sqvqaziqkjv17d4cqcanm9hgb8-nixos-system-pumpkin-24.05.20240512.2057814/init usrhash=c8aa1fbcdfb0ab3d9ff30330ef4e5e2abc372f4db8aeb34411181af87ecf59d5 mount.usr=/dev/mapper/usr mount.usrflags=ro mount.usrfstype=squashfs systemd.verity_root_options=panic-on-corruption root=fstab loglevel=4
May 15 13:16:48 localhost kernel: BIOS-provided physical RAM map:
May 15 13:16:48 localhost kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
May 15 13:16:48 localhost kernel: BIOS-e820: [mem 0x0000000000100000-0x0000000009bfffff] usable
May 15 13:16:48 localhost kernel: BIOS-e820: [mem 0x0000000009c00000-0x0000000009da0fff] reserved
May 15 13:16:48 localhost kernel: BIOS-e820: [mem 0x0000000009da1000-0x0000000009efffff] usable
May 15 13:16:48 localhost kernel: BI
@jmbaur
jmbaur / uboot-status.md
Last active October 4, 2023 23:42
U-Boot 2023.10 on nixpkgs build status

U-Boot 2023.10 on nixpkgs build status

All built with stdenv.buildPlatform.system == "x86_64-linux":

  • ubootTools
  • pkgsCross.aarch64-multiplatform.ubootTools
  • pkgsCross.armv7l-hf-multiplatform.ubootA20OlinuxinoLime
  • pkgsCross.armv7l-hf-multiplatform.ubootA20OlinuxinoLime2EMMC
  • pkgsCross.armv7l-hf-multiplatform.ubootAmx335xEVM
  • pkgsCross.armv7l-hf-multiplatform.ubootBananaPi

Keybase proof

I hereby claim:

  • I am jmbaur on github.
  • I am jaredbaur (https://keybase.io/jaredbaur) on keybase.
  • I have a public key whose fingerprint is D4A0 6928 74AA 71B7 F128 1491 BB86 67EA 7EB0 8143

To claim this, I am signing this object: