Goal
Support declarative Nix package management from TRX.
Description
Implement the PackageManager trait in src/managers/nix.rs for the Nix package manager.
Key challenges unique to Nix:
- Profiles: Packages can be in the system profile or user profile; handle both
- Package naming: Nix uses attribute paths (e.g.,
nixpkgs.git) rather than simple names
- Immutability: Nix doesn't "remove" packages traditionally — it updates the profile
- Search: Use
nix search nixpkgs <query> (Nix 2.x) and parse JSON output (--json)
Required methods:
search(query) → nix search nixpkgs <query> --json
get_installed() → nix profile list or nix-env -q
install() → nix profile install nixpkgs#<pkg>
remove() → nix profile remove <pkg>
system_upgrade() → nix profile upgrade '.*'
Tech
Rust, Nix CLI, JSON parsing
Difficulty
Level 3 – Advanced
Goal
Support declarative Nix package management from TRX.
Description
Implement the
PackageManagertrait insrc/managers/nix.rsfor the Nix package manager.Key challenges unique to Nix:
nixpkgs.git) rather than simple namesnix search nixpkgs <query>(Nix 2.x) and parse JSON output (--json)Required methods:
search(query)→nix search nixpkgs <query> --jsonget_installed()→nix profile listornix-env -qinstall()→nix profile install nixpkgs#<pkg>remove()→nix profile remove <pkg>system_upgrade()→nix profile upgrade '.*'Tech
Rust, Nix CLI, JSON parsing
Difficulty
Level 3 – Advanced