Skip to content

Commit

Permalink
add stuff to applications on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterStolz committed Dec 9, 2024
1 parent 755e50a commit 87ddde7
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ in
};
};


yt-dlp.enable = true;

kitty = {
Expand Down Expand Up @@ -136,6 +135,26 @@ in
);

home = {

# https://github.com/nix-community/home-manager/issues/1341
activation.link-apps = lib.hm.dag.entryAfter [ "linkGeneration" ] (
if pkgs.stdenv.isDarwin then
''
new_nix_apps="${config.home.homeDirectory}/Applications/Nix"
rm -rf "$new_nix_apps"
mkdir -p "$new_nix_apps"
find -H -L "$newGenPath/home-files/Applications" -name "*.app" -type d -print | while read -r app; do
real_app=$(readlink -f "$app")
app_name=$(basename "$app")
target_app="$new_nix_apps/$app_name"
echo "Alias '$real_app' to '$target_app'"
${pkgs.mkalias}/bin/mkalias "$real_app" "$target_app"
done
''
else
""
);

enableNixpkgsReleaseCheck = false;
username = username;

Expand Down

0 comments on commit 87ddde7

Please sign in to comment.