<nixpkgs>: what to do with NixOS bare machines?
Nobody has claimed this yet.
- Dominant language
- Nix
- Stars
- 4k
- Forks
- 339
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 7
Description
That one is tricky because be design nixos-rebuild depends on $NIX_PATH.
There are a few ways forward:
a) Flakes will solve this with locking, but they are not released yet.
b) For legacy we could change nixos-rebuild to look for /etc/nixos/nixpkgs.nix and use it to import <nixpkgs>.
c) Without changing upstream, one can create a wrapper called nixos-rebuild that sets $NIX_PATH to point to a commit and calls the original nixos-rebuild command. Not ideal since it won't do the right thing on the first installation, but the second will do.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing how nixos-rebuild depends on $NIX_PATH and the first-installation behavior described in the issue. Compare the proposed flakes, /etc/nixos/nixpkgs.nix, and wrapper approaches, then confirm the project’s chosen direction; done means an agreed approach is recorded for bare NixOS machines.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100