Skip to content

AmazinAxel/homelab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 6, 2026
7d89e17 · · Mar 6, 2026

History

198 Commits
Dec 15, 2025
Jan 27, 2026
Feb 27, 2026
Jan 31, 2026
Feb 2, 2026
Jan 26, 2026
Feb 28, 2026
Mar 6, 2026
Jan 26, 2026
Feb 28, 2026
Feb 1, 2026
Feb 1, 2026

Repository files navigation

Alec's homelab server

Runs on a Raspberry Pi Zero 2W. Hosts a local webserver that accepts & stores AQI readings (on attached drive) and graphs it. Network storage w/ Samba share which automounts attached USB drives and integrates with my my desktop flake for weekly reminders to sync data from this share.

Also has daily systemd tasks which make backups of private Github repos & downloads Spotify playlists and is easily accessible with a network-wide Avahi .local resolve shorthand.and.

Build on your own system

Add cross compiling support to your host Nix config: boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; Rebuild your host and set /home/alec/GithubToken to a PAT to back up private Github repos.

nix run nixpkgs#nixos-generators -- -f sd-aarch64 --flake .#alechomelab --system aarch64-linux -o ./alechomelabsd
sudo cp alechomelabsd/sd-image/nixos-image-sd-card--hash here>gt;-aarch64-linux.img.zst ./alechomelabsd-compressed-sd-image.img.zst

unzstd -d alechomelabsd-compressed-sd-image.img.zst -o alechomelabsd-sd-image.img
sudo dd if=./alechomelabsd-sd-image.img of=/dev/sdX bs=1M status=progressess

The image will only partition about 4GB of the card, so use udisks to resize the main partition to use the whole card. I recommend using an 8GB or 16GB card - larger cards can slow the system down and isn't used for file storage.

Default login is user alec password nixos (use passwd alec to change)

How to use

Set AIRNOW_TOKEN= in webserver/.env for Airnow.gov data to work Paste your Github auth token to /home/alec/GithubToken Set the Samba user password: sudo smbpasswd -a alec Update the client key and secret to use your own from the Spotify developer dashboard. in /home/alec/.config/spotdl/config.json. If you get a rate limit error, enable the no_cache option.

Use remote deployments to update since the Zero 2W doesnt have enough memory to build itself: nixos-rebuild switch --flake .#alechomelab --sudo --ask-sudo-password --target-host [email protected]

RPi config

Replace the config.txt file in the Pi's FIRMWARE partition with:

# For proper boot
kernel=u-boot-rpi3.bin
arm_64bit=1
enable_uart=1

1

# Turn on spi & i2c and gpio buttonstons
dtparam=spi=on
dtparam=i2c_arm=on
gpio=6,19,5,26,13,21,20,16=pu

u

# Disable hdmi output
gpu_mem=16
disable_fw_kms_setup=1
disable_overscan=1
hdmi_force_hotplug=0
hdmi_blanking=2

g=2

# Faster boot
boot_delay=0
disable_splash=1
avoid_warnings=1s=1

3D printable base case

I've made a simple model for the base of the Pi. I'm using this acrylic kit which I acquired from Daydream Seattle. The model is available here.

Building the display program

Use the nix devshell to install gcc & the libraries for the program on your computer: er: cd display && nix develop develop and make Run cd display && nix-shell -p gcc gnumake libgpiod_1bgpiod_1 and make to build the program on the Pi. You can run the ./homelabDisplay binary in /home/alec/homelab/display/ or reboot to start the program.

Note that you will need GPIO header pins and this 1.44in Waveshare HAT to use the display program.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published