Skip to content

feat: add Nix support to devops image#15

Merged
megheaiulian merged 1 commit into
mainfrom
feat/devops-nix
Feb 26, 2026
Merged

feat: add Nix support to devops image#15
megheaiulian merged 1 commit into
mainfrom
feat/devops-nix

Conversation

@megheaiulian

Copy link
Copy Markdown
Contributor

Summary

  • Installs upstream Nix (from nixos.org) in single-user mode so nix build and nix flake work out of the box for the coder user
  • No Determinate Systems tooling, no daemon, no systemd required

Changes

  • Add xz-utils to apt-get install (required by the Nix installer to decompress its tarball)
  • Create /nix owned by coder while still running as root, so the single-user install doesn't need sudo
  • Run the official nixos.org/nix/install script with --no-daemon as the coder user
  • Write ~/.config/nix/nix.conf to enable experimental-features = nix-command flakes
  • Prepend ~/.nix-profile/bin to PATH via ENV so nix is available in non-interactive shells

Install upstream Nix in single-user mode so that nix build and
nix flake work out of the box for the coder user.

- Add xz-utils (required by the Nix installer to decompress the tarball)
- Create /nix owned by coder before switching to that user
- Run the official nixos.org installer with --no-daemon (no systemd needed)
- Write ~/.config/nix/nix.conf to enable nix-command and flakes
- Prepend ~/.nix-profile/bin to PATH via ENV
@megheaiulian megheaiulian merged commit 771a6ae into main Feb 26, 2026
3 checks passed
@megheaiulian megheaiulian deleted the feat/devops-nix branch February 26, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant