Skip to content

truelecter/infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

truelecter's infra

hosts build shells build nixos 25.05

Introduction

This repository contains the Nix code that builds my systems using flake-parts. None of these NixOS and Darwin configurations will work out of the box for you (unless you have my keys 😱).
This repo is intended for sharing some interesting parts of my infra and for some inspiration for how I was inspired myself based on other similar repos.

Why Nix?

Nix allows for easy to manage, collaborative, reproducible deployments. This means that once something is setup and configured once, it works forever. If someone else shares their configuration, anyone can make use of it.

This flake is configured using flake-parts for a modular approach.

Repository Structure

  • /nixos - NixOS configurations
    • /nixos/hosts/x86_64 - x86_64 NixOS hosts
      • tl-wsl - WSL system
      • depsos - Server for publically hosted services
      • nas - NAS with some multimedia stuff
      • sirius - Home Assistant and 3D printer coordination
    • /nixos/hosts/aarch64 - aarch64 NixOS hosts
      • 3D Printers:
        • voron - Voron 2.4 300mm
        • vzbot235 - VzBot 235
        • tiny-m - Tiny-M 150mm
      • Misc:
        • oracle - Game servers and remote builder
  • /darwin - Darwin configurations
    • /darwin/hosts - aarch64-darwin hosts
      • suadbook - Main workstation
      • tl-mm4 - aarch64-darwin and aarch64-linux builder
  • /home - Home-manager configurations
  • /parts - flake-parts modules
    • /parts/klipper - Klipper 3D printer related configurations
    • /parts/raspberry-pi - Raspberry Pi specific configurations
    • /parts/rockchip - Rockchip SoC configurations
    • /parts/k8s - K3S wrappers and version pinning
    • /parts/minecraft-servers - Minecraft server configurations
  • /profiles - Shared system profiles
  • /lib - Helper functions and utilities
  • /secrets - Encrypted secrets (using sops-nix)
  • /shell - Development shell configurations

Apply Configurations

NixOS Hosts

For NixOS hosts, you can use deploy-rs to deploy configurations:

deploy --skip-checks '.#<hostname>'

Darwin Hosts

For macOS hosts running nix-darwin:

# First-time setup - bootstrap aarch64-linux builder
nix run github:nixos/nixpkgs/nixpkgs-23.11-darwin#darwin.linux-builder
nix build --builders 'builder@localhost aarch64-linux /etc/nix/builder_ed25519' .#darwinConfigurations.<hostname>.system

# Switch configuration (local)
darwin-rebuild switch --flake .#<hostname>

# Switch configuration (remote)
deploy --skip-checks '.#<hostname>'

Development

A development shell is available with useful utilities:

nix develop

Resources

Core

Repo management

Libraries

Notable mentions

Previous configurations

This is a third iteration of repository structure. You can find previous attempts here:

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •