-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set default flake directory as /etc/nix-darwin
#741
Conversation
3192761
to
a3b06e6
Compare
If we do this, should we also switch the non-flakes default (I guess that might be backwards-incompatible?) and update the README? |
4e604a8
to
c91f823
Compare
@emilazy my preference would not be to do any breaking changes while we don't have release channels, and this PR only affects behaviour for users who have a flake present in |
Okay, sure; I'm in favour. Could maybe make the instructions clearer around #740 when adjusting the docs too. |
I'm not sure that introducing inconsistent locations is a good idea. For changing this in general with compatibility in mind, we could add detection for the global location and fallback to a per-user config so both cases work. With NIX_PATH it is relatively easy for a user to specify their own default location, does something equivalent exist for nixos with the flake location? |
I think there's already inconsistency since the installer etc. use
Unfortunately I don't think so. Though maybe one has been added since I last checked. I can think of multiple ways to do it but I don't know which are any good. I always just manually specified the location. Some people |
c91f823
to
da0b8b1
Compare
I've updated this PR to search I think we should migrate to This PR is now ready to merge as it is no longer opinionated about the default flake directory. |
So that we're able to do `darwin-rebuild --flake .` since there's no default flake path at the moment. There's however a PR that'll set nix-darwin default flake path to `~/.config/nix-darwin` (or `/etc/nix-darwin`). REF: - LnL7/nix-darwin#721 - LnL7/nix-darwin#741
da0b8b1
to
902d6b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a symlink and my configuration activated successfully; LGTM.
Backported from https://github.com/NixOS/nixpkgs/blob/9995a5d59c59fde96f4ad7d811a8ed832357440f/pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh#L349-L353
Fixes #721