Skip to content
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

darwin-rebuild: add ~/.config/darwin/ as default flake location #874

Closed
wants to merge 1 commit into from

Conversation

bouk
Copy link

@bouk bouk commented Feb 18, 2024

As the title says. This matches the nixos-rebuild feature to automatically use a flake if it's available.

I'm currently using it on my own system and it works like a charm!

Closes #721

Comment on lines +134 to +136
# Use ~/.config/darwin/flake.nix if it exists. It can be a symlink to the actual flake.
if [[ -z $flake && -e ~/.config/darwin/flake.nix && -z $noFlake ]]; then
flake="$(dirname "$(readlink -f ~/.config/darwin/flake.nix)")"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Use ~/.config/darwin/flake.nix if it exists. It can be a symlink to the actual flake.
if [[ -z $flake && -e ~/.config/darwin/flake.nix && -z $noFlake ]]; then
flake="$(dirname "$(readlink -f ~/.config/darwin/flake.nix)")"
# Use /etc/nix-darwin/flake.nix if it exists. It can be a symlink to the actual flake.
if [[ -z $flake && -e /etc/nix-darwin/flake.nix && -z $noFlake ]]; then
flake="$(dirname "$(readlink -f /etc/nix-darwin/flake.nix)")"

@bouk bouk force-pushed the bouk/darwin-rebuild-flakes branch from a41f5ce to c1dbb27 Compare May 10, 2024 13:10
@Enzime
Copy link
Collaborator

Enzime commented Jul 9, 2024

This is closed in favour of #741

@Enzime Enzime closed this Jul 9, 2024
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.

Use flake.nix by default if it exists
2 participants