Cloud
Basic Configuration
Section titled “Basic Configuration”Create a devenv.nix file in your project root:
{ pkgs, ... }: { languages = { python.enable = true; nodejs.enable = true; };
packages = with pkgs; [ git curl jq ];
services.postgres = { enable = true; initialDatabases = [{ name = "myapp"; }]; };}Local-first with conditionals on Cloud
Section titled “Local-first with conditionals on Cloud”Use config.cloud.enable to conditionally configure services:
{ pkgs, lib, config, ... }: { services = { # Run PostgreSQL only locally postgresql.enable = !config.cloud.enable;
# Use cloud Redis only on cloud redis.enable = config.cloud.enable; };}GitHub CI Integration
Section titled “GitHub CI Integration”Access GitHub context in your configuration:
{ pkgs, lib, config, ... }:let github = config.cloud.ci.github;in { git-hooks = { hooks.rustfmt.enable = true; # Run hooks only on changes fromRef = github.base_ref or null; toRef = github.ref or null; };
tasks = { # Branch-specific tasks "code-review" = lib.mkIf (github.branch == "main") { exec = "claude @code-reviewer"; }; };}
