darwin apps should be put to spotlights
parent
29d6a06346
commit
516612c36e
|
@ -458,11 +458,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1679262748,
|
"lastModified": 1679437018,
|
||||||
"narHash": "sha256-DQCrrAFrkxijC6haUzOC5ZoFqpcv/tg2WxnyW3np1Cc=",
|
"narHash": "sha256-vOuiDPLHSEo/7NkiWtxpHpHgoXoNmrm+wkXZ6a072Fc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "60c1d71f2ba4c80178ec84523c2ca0801522e0a6",
|
"rev": "19cf008bb18e47b6e3b4e16e32a9a4bdd4b45f7e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ lib, pkgs, config, ... }:
|
||||||
|
{
|
||||||
|
# Copy GUI apps to "~/Applications/Home Manager Apps"
|
||||||
|
# Based on this comment: https://github.com/nix-community/home-manager/issues/1341#issuecomment-778820334
|
||||||
|
home.activation.darwinApps =
|
||||||
|
if pkgs.stdenv.isDarwin then
|
||||||
|
let
|
||||||
|
apps = pkgs.buildEnv {
|
||||||
|
name = "home-manager-applications";
|
||||||
|
paths = config.home.packages;
|
||||||
|
pathsToLink = "/Applications";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
# Install MacOS applications to the user environment.
|
||||||
|
HM_APPS="$HOME/Applications/Home Manager Apps"
|
||||||
|
# Reset current state
|
||||||
|
[ -e "$HM_APPS" ] && $DRY_RUN_CMD rm -r "$HM_APPS"
|
||||||
|
$DRY_RUN_CMD mkdir -p "$HM_APPS"
|
||||||
|
# .app dirs need to be actual directories for Finder to detect them as Apps.
|
||||||
|
# In the env of Apps we build, the .apps are symlinks. We pass all of them as
|
||||||
|
# arguments to cp and make it dereference those using -H
|
||||||
|
$DRY_RUN_CMD cp --archive -H --dereference ${apps}/Applications/* "$HM_APPS"
|
||||||
|
$DRY_RUN_CMD chmod +w -R "$HM_APPS"
|
||||||
|
''
|
||||||
|
else
|
||||||
|
"";
|
||||||
|
}
|
|
@ -179,6 +179,7 @@
|
||||||
modules = base.modules ++ [
|
modules = base.modules ++ [
|
||||||
./home.nix
|
./home.nix
|
||||||
./base/productive_desktop.nix
|
./base/productive_desktop.nix
|
||||||
|
./base/darwin-spotlight.nix
|
||||||
{
|
{
|
||||||
base.private_chromium.enable = false;
|
base.private_chromium.enable = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue