fix(macos): trampoline apps
This commit is contained in:
parent
c707909f4f
commit
01240450d2
3 changed files with 28 additions and 0 deletions
|
@ -21,6 +21,10 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
mac-app-util = {
|
||||
url = "github:hraban/mac-app-util";
|
||||
};
|
||||
|
||||
# Home Manager
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
|
@ -104,6 +108,7 @@
|
|||
, nixpkgs
|
||||
, nix-on-droid
|
||||
, nix-darwin
|
||||
, mac-app-util
|
||||
, home-manager
|
||||
, disko
|
||||
, deploy-rs
|
||||
|
|
20
modules/home-manager/darwin-trampolines/default.nix
Normal file
20
modules/home-manager/darwin-trampolines/default.nix
Normal 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"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
{ inputs, outputs, ... }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
with lib;
|
||||
|
@ -181,6 +182,8 @@ in
|
|||
|
||||
# echo "Set 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
|
||||
|
|
Loading…
Reference in a new issue