Add Nix Flake #8

Merged
vanhouc merged 3 commits from nix into main 2026-04-25 20:04:19 -04:00
vanhouc commented 2026-04-25 19:50:11 -04:00 (Migrated from github.com)

This pull request sets up a reproducible development environment using Nix flakes, configures the Rust toolchain, and updates deployment settings for the project. The main changes are the introduction of a flake.nix file to define the environment, addition of a Rust toolchain configuration, and a refinement of the deployment VM settings.

Development environment setup:

  • Added a flake.nix file to define a Nix flake for the project, specifying dependencies, supported systems, and providing both build and development shell environments with Rust and necessary libraries.
  • Added use flake to .envrc to automatically load the Nix flake environment when entering the project directory.

Rust toolchain configuration:

  • Added toolchain.toml to pin the Rust toolchain to the stable channel for consistent builds.

Deployment configuration:

  • Updated the fly.toml VM configuration to explicitly set memory, CPU kind, and number of CPUs for the deployment environment.
This pull request sets up a reproducible development environment using Nix flakes, configures the Rust toolchain, and updates deployment settings for the project. The main changes are the introduction of a `flake.nix` file to define the environment, addition of a Rust toolchain configuration, and a refinement of the deployment VM settings. **Development environment setup:** * Added a `flake.nix` file to define a Nix flake for the project, specifying dependencies, supported systems, and providing both build and development shell environments with Rust and necessary libraries. * Added `use flake` to `.envrc` to automatically load the Nix flake environment when entering the project directory. **Rust toolchain configuration:** * Added `toolchain.toml` to pin the Rust toolchain to the stable channel for consistent builds. **Deployment configuration:** * Updated the `fly.toml` VM configuration to explicitly set memory, CPU kind, and number of CPUs for the deployment environment.
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2026-04-25 19:53:10 -04:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull request overview

This PR introduces a Nix flake-based development environment, adds a Rust toolchain configuration file, and refines Fly.io VM sizing to make local development and deployments more consistent.

Changes:

  • Add flake.nix/flake.lock to provide reproducible Nix build + dev shell environments (Rust + OpenSSL).
  • Add .envrc (direnv) integration and ignore .direnv artifacts.
  • Update fly.toml VM config to explicitly set memory/CPU parameters.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
toolchain.toml Adds a Rust toolchain TOML file (currently named in a way that likely won’t be picked up by rustup).
flake.nix Defines flake inputs and per-system Rust build + dev shell.
flake.lock Pins Nix inputs for reproducibility.
.envrc Enables automatic flake loading via direnv.
.gitignore Ignores .direnv directory.
fly.toml Replaces VM “size” with explicit CPU/memory fields.

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

## Pull request overview This PR introduces a Nix flake-based development environment, adds a Rust toolchain configuration file, and refines Fly.io VM sizing to make local development and deployments more consistent. **Changes:** - Add `flake.nix`/`flake.lock` to provide reproducible Nix build + dev shell environments (Rust + OpenSSL). - Add `.envrc` (direnv) integration and ignore `.direnv` artifacts. - Update `fly.toml` VM config to explicitly set memory/CPU parameters. ### Reviewed changes Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment. <details> <summary>Show a summary per file</summary> | File | Description | | ---- | ----------- | | `toolchain.toml` | Adds a Rust toolchain TOML file (currently named in a way that likely won’t be picked up by rustup). | | `flake.nix` | Defines flake inputs and per-system Rust build + dev shell. | | `flake.lock` | Pins Nix inputs for reproducibility. | | `.envrc` | Enables automatic flake loading via direnv. | | `.gitignore` | Ignores `.direnv` directory. | | `fly.toml` | Replaces VM “size” with explicit CPU/memory fields. | </details> --- 💡 <a href="/vanhouc/vanhouzen-site/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
@ -0,0 +1,2 @@
[toolchain]
channel = "stable"
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-04-25 19:53:10 -04:00

toolchain.toml is not a Rust toolchain override file recognized by rustup/cargo; the standard filenames are rust-toolchain.toml (or rust-toolchain). As-is, this file likely has no effect and the Rust version will not be pinned as intended. Rename the file accordingly (and keep the same TOML contents).

`toolchain.toml` is not a Rust toolchain override file recognized by rustup/cargo; the standard filenames are `rust-toolchain.toml` (or `rust-toolchain`). As-is, this file likely has no effect and the Rust version will not be pinned as intended. Rename the file accordingly (and keep the same TOML contents).
vanhouc (Migrated from github.com) reviewed 2026-04-25 19:56:57 -04:00
@ -0,0 +1,2 @@
[toolchain]
channel = "stable"
vanhouc (Migrated from github.com) commented 2026-04-25 19:56:57 -04:00

@copilot apply changes based on this feedback

@copilot apply changes based on [this feedback](https://github.com/vanhouc/vanhouzen-site/pull/8#discussion_r3142747656)
copilot-swe-agent[bot] (Migrated from github.com) reviewed 2026-04-25 19:57:34 -04:00
@ -0,0 +1,2 @@
[toolchain]
channel = "stable"
copilot-swe-agent[bot] (Migrated from github.com) commented 2026-04-25 19:57:34 -04:00

Renamed toolchain.toml to rust-toolchain.toml in commit 004f6a8. The file will now be recognized by rustup/cargo as the toolchain override.

Renamed `toolchain.toml` to `rust-toolchain.toml` in commit `004f6a8`. The file will now be recognized by rustup/cargo as the toolchain override.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cameron/website!8
No description provided.