Comment out solution for mkappalias on darwin, dont think its needed

anymore
This commit is contained in:
Martin Larsson 2025-12-25 13:42:30 +01:00
parent e52e687dff
commit 211d4b9661
3 changed files with 44 additions and 44 deletions

View file

@ -29,12 +29,12 @@ in
]; ];
file = utils.mk_symlinks { inherit config dotfiles; }; file = utils.mk_symlinks { inherit config dotfiles; };
activation.applications = utils.mkAppAliasHome { # activation.applications = utils.mkAppAliasHome {
derivationName = "home-applications"; # derivationName = "home-applications";
appsPath = config.home.packages; # appsPath = config.home.packages;
outputDir = "${config.home.homeDirectory}/Applications/Nix"; # outputDir = "${config.home.homeDirectory}/Applications/Nix";
pkgs = pkgs; # pkgs = pkgs;
lib = lib; # lib = lib;
}; # };
}; };
} }

View file

@ -70,13 +70,13 @@ in
}; };
hitoolbox.AppleFnUsageType = "Show Emoji & Symbols"; hitoolbox.AppleFnUsageType = "Show Emoji & Symbols";
}; };
#
activationScripts.applications.text = utils.mkAppAliasSystem { # activationScripts.applications.text = utils.mkAppAliasSystem {
derivationName = "system-applications"; # derivationName = "system-applications";
appsPath = config.environment.systemPackages; # appsPath = config.environment.systemPackages;
outputDir = "/Applications/Nix"; # outputDir = "/Applications/Nix";
pkgs = pkgs; # pkgs = pkgs;
lib = lib; # lib = lib;
}; # };
}; };
} }

View file

@ -14,38 +14,38 @@ rec {
}) dotfiles }) dotfiles
); );
mkAppAliasSystem = args: args.pkgs.lib.mkForce (mkAppAliasScriptContent args); # mkAppAliasSystem = args: args.pkgs.lib.mkForce (mkAppAliasScriptContent args);
mkAppAliasHome = # mkAppAliasHome =
args: args.lib.hm.dag.entryAfter [ "writeBoundary" ] (mkAppAliasScriptContent args); # args: args.lib.hm.dag.entryAfter [ "writeBoundary" ] (mkAppAliasScriptContent args);
# Darwin System / Home Manager expects activation scripts in different formats # Darwin System / Home Manager expects activation scripts in different formats
# This only return the script body, use the other two functions in the config. # This only return the script body, use the other two functions in the config.
mkAppAliasScriptContent = # mkAppAliasScriptContent =
{ # {
derivationName, # derivationName,
appsPath, # appsPath,
outputDir, # outputDir,
pkgs, # pkgs,
lib, # lib,
}: # }:
let # let
env = pkgs.buildEnv { # env = pkgs.buildEnv {
name = derivationName; # name = derivationName;
paths = appsPath; # paths = appsPath;
pathsToLink = "/Applications"; # pathsToLink = "/Applications";
}; # };
in # in
'' # ''
echo "Setting up macOS .app aliases..." >&2 # echo "Setting up macOS .app aliases..." >&2
rm -rf "${outputDir}" # rm -rf "${outputDir}"
mkdir -p "${outputDir}" # mkdir -p "${outputDir}"
#
find ${env}/Applications -maxdepth 1 -type l -exec readlink '{}' + | # find ${env}/Applications -maxdepth 1 -type l -exec readlink '{}' + |
while read -r src; do # while read -r src; do
app_name=$(basename "$src") # app_name=$(basename "$src")
${pkgs.mkalias}/bin/mkalias "$src" "${outputDir}/$app_name" # ${pkgs.mkalias}/bin/mkalias "$src" "${outputDir}/$app_name"
done # done
''; # '';
mkFswatchService = mkFswatchService =
{ {