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; };
activation.applications = utils.mkAppAliasHome {
derivationName = "home-applications";
appsPath = config.home.packages;
outputDir = "${config.home.homeDirectory}/Applications/Nix";
pkgs = pkgs;
lib = lib;
};
# activation.applications = utils.mkAppAliasHome {
# derivationName = "home-applications";
# appsPath = config.home.packages;
# outputDir = "${config.home.homeDirectory}/Applications/Nix";
# pkgs = pkgs;
# lib = lib;
# };
};
}

View file

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

View file

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