fix(macos): trampoline apps

This commit is contained in:
reo101 2023-11-17 15:58:59 +02:00
parent c707909f4f
commit 01240450d2
Signed by: reo101
GPG key ID: 675AA7EF13964ACB
3 changed files with 28 additions and 0 deletions

View file

@ -21,6 +21,10 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
mac-app-util = {
url = "github:hraban/mac-app-util";
};
# Home Manager # Home Manager
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
@ -104,6 +108,7 @@
, nixpkgs , nixpkgs
, nix-on-droid , nix-on-droid
, nix-darwin , nix-darwin
, mac-app-util
, home-manager , home-manager
, disko , disko
, deploy-rs , deploy-rs

View file

@ -0,0 +1,20 @@
{ inputs, outputs, ... }:
{ lib, pkgs, config, ... }:
{
imports = [ ];
options = { };
config = {
home.activation = lib.mkIf pkgs.stdenv.isDarwin {
trampolineApps = let
mac-app-util = inputs.mac-app-util.packages.${pkgs.stdenv.system}.default;
in lib.hm.dag.entryAfter [ "writeBoundary" ] ''
fromDir="$HOME/Applications/Home Manager Apps"
toDir="$HOME/Applications/Home Manager Trampolines"
${mac-app-util}/bin/mac-app-util sync-trampolines "$fromDir" "$toDir"
'';
};
};
}

View file

@ -1,3 +1,4 @@
{ inputs, outputs, ... }:
{ lib, pkgs, config, ... }: { lib, pkgs, config, ... }:
with lib; with lib;
@ -181,6 +182,8 @@ in
# echo "Set hostname" # echo "Set hostname"
# sudo scutil --set HostName $hostname # sudo scutil --set HostName $hostname
${inputs.mac-app-util.packages.${pkgs.stdenv.system}.default}/bin/mac-app-util sync-trampolines "/Applications/Nix Apps" "/Applications/Nix Trampolines"
''; '';
# User-level settings # User-level settings