The home-activation seems resolved.
This commit is contained in:
larstvei 2022-11-19 15:53:03 +01:00
parent 6e4d6655b4
commit 5e29ff90cb
2 changed files with 15 additions and 40 deletions

View File

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1667419884, "lastModified": 1668784520,
"narHash": "sha256-oLNw87ZI5NxTMlNQBv1wG2N27CUzo9admaFlnmavpiY=", "narHash": "sha256-gGgVAMwYPPmrfnvnoRi6OkEB5KRsNTb9uYzEceLdO/g=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "cfc0125eafadc9569d3d6a16ee928375b77e3100", "rev": "6349b99bc2b96ded34d068a88c7c5ced406b7f7f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -45,11 +45,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1667574732, "lastModified": 1668788863,
"narHash": "sha256-73TVk3uSQOja6Q/5OuNcpcqwo6+SMzJPRtYAjU0rBx4=", "narHash": "sha256-FsdUG+YkRX7JZKZm6T44J2h+0pXB1sWA9AobyiozFK0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "b764068a506c6f70dba998efa0e7fcb99cb4deb2", "rev": "948d1f8a5cef55a281d4f5d17f3b79df6c82fce1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -60,11 +60,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1667550113, "lastModified": 1668539998,
"narHash": "sha256-WcFfEHvOTVP/oa1L4DY9wqoGMaz1vnehLccQ4QYytw8=", "narHash": "sha256-G+HPyz9wv47+lY1AMmrA0ebyZR2gwnyIeouzOLhdVdE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "bf8564890dfbc86aee93c080470389b00a57d498", "rev": "02ac89b8e803881ab63c7727db631e63721ca370",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -76,11 +76,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1667379994, "lastModified": 1668852955,
"narHash": "sha256-PFOg8WHqfKXsIGZtEC0aB+rl8SB1cXvA01ytIudnRh8=", "narHash": "sha256-1ozaNW9uFRvm3cP9M6FPx+hdqyFQnf49M3HrLQ6nqrk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a704b9029586266f63807f64a6718f1a65b0f83b", "rev": "2fb6f9fb0ef3ca727cbd9ae30b90d1ce49d5fcca",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -101,11 +101,11 @@
}, },
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1667077288, "lastModified": 1667395993,
"narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=", "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817", "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -1,30 +1,5 @@
{ pkgs, lib, config, home-manager, nix-darwin, inputs, ... }: { { pkgs, lib, config, home-manager, nix-darwin, inputs, ... }: {
# Can probably be removed when this is resolved:
# https://github.com/nix-community/home-manager/issues/1341
home.activation = {
copyApplications =
let
apps = pkgs.buildEnv {
name = "home-manager-applications";
paths = config.home.packages;
pathsToLink = "/Applications";
};
in
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
baseDir="$HOME/Applications/Home Manager Apps"
if [ -d "$baseDir" ]; then
rm -rf "$baseDir"
fi
mkdir -p "$baseDir"
for appFile in ${apps}/Applications/*; do
target="$baseDir/$(basename "$appFile")"
$DRY_RUN_CMD cp ''${VERBOSE_ARG:+-v} -fHRL "$appFile" "$baseDir"
$DRY_RUN_CMD chmod ''${VERBOSE_ARG:+-v} -R +w "$target"
done
'';
};
home.packages = with pkgs; [ home.packages = with pkgs; [
((emacsPackagesFor emacs-mac).emacsWithPackages ((emacsPackagesFor emacs-mac).emacsWithPackages