Skip to content

Commit

Permalink
fix: use nix-darwin daemon socket listener
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Sep 1, 2024
1 parent 07241f5 commit c55b70e
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions hosts/darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,24 @@

# We install Nix using a separate installer so we don't want nix-darwin
# to manage it for us. This tells nix-darwin to just use whatever is running.
services.nix-daemon.enable = true;
services.nix-daemon = {
enable = true;
enableSocketListener = true;
};

# zsh is the default shell on Mac and we want to make sure that we're
# configuring the rc correctly with nix-darwin paths.
programs.zsh.enable = true;
programs.zsh.shellInit = ''
# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix
'';

# We don't need this workaround anymore since we're using nix-darwin socket
# listener to manage the daemon.
# programs.zsh.shellInit = ''
# # Nix
# if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
# . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
# fi
# # End Nix
# '';

homebrew = {
enable = true;
Expand Down

0 comments on commit c55b70e

Please sign in to comment.