NixFiles

From desktop to server—fully reproducible environments powered by Nix.

A personal Nix Flakes configuration system designed to manage multiple machines through a single, reproducible source of truth. Instead of configuring each host manually, all system definitions, packages, and development environments are expressed declaratively using Nix. This ensures every machine behaves consistently, whether it is a desktop, laptop, server, or build node.

Each host in the configuration serves a specific role in the overall infrastructure. The desktop machine handles primary local development and heavy builds when possible, while the laptop provides mobility and a secondary working environment. Older hardware is repurposed as a backup build system, ensuring redundancy for compilation workloads. Remote servers extend this system further by handling continuous builds, caching, and hosting services. Together, they form a distributed and resilient development ecosystem managed entirely through Nix Flakes.

The nixfiles structure acts as the central configuration layer for all of these systems. It defines system modules, shared packages, and host-specific configurations in a reproducible way. By using flakes, every machine can be rebuilt from scratch with identical results, eliminating configuration drift. This also allows seamless updates, rollbacks, and consistent environments across both local and remote systems.

Rust Development Shell

A key part of this configuration is the included Rust development shell, which provides an isolated and fully reproducible environment for Rust development. It is designed to eliminate the need for manually installing toolchains or managing dependencies across different systems.

The Rust shell includes the stable Rust toolchain along with essential developer tools such as cargo, rustfmt, and clippy for formatting and linting. It also integrates advanced Cargo utilities like cargo-watch for live reloading, cargo-expand for macro inspection, and cargo-outdated for dependency auditing. Additional system libraries are included to ensure compatibility with a wide range of Rust crates, particularly those requiring native bindings or system-level compilation.

This shell can be launched directly using:

nix develop .#rust

or automatically activated through direnv for per-project environments. The result is a consistent, portable Rust workspace that behaves identically across all configured hosts, ensuring that builds, tests, and tooling remain stable regardless of where development takes place.

  • NixFiles — A reproducible multi-host system configuration using Nix Flakes to manage desktops, laptops, and servers from a single declarative source.