Currently, this module makes sure that `/Applications` directories for packages in `home.packages` get linked into the user's environment.wip/yesman
parent
bd4c2b0651
commit
d3aee544b6
@ -0,0 +1,14 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
{ |
||||
config = lib.mkIf pkgs.stdenv.hostPlatform.isDarwin { |
||||
# Install MacOS applications to the user environment. |
||||
home.file."Applications/Home Manager Apps".source = let |
||||
apps = pkgs.buildEnv { |
||||
name = "home-manager-applications"; |
||||
paths = config.home.packages; |
||||
pathsToLink = "/Applications"; |
||||
}; |
||||
in "${apps}/Applications"; |
||||
}; |
||||
} |
@ -0,0 +1,20 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
|
||||
darwinTestApp = pkgs.runCommandLocal "target-darwin-example-app" { } '' |
||||
mkdir -p $out/Applications |
||||
touch $out/Applications/example-app |
||||
''; |
||||
|
||||
in { |
||||
config = { |
||||
home.packages = [ darwinTestApp ]; |
||||
|
||||
nmt.script = '' |
||||
assertFileExists 'home-files/Applications/Home Manager Apps/example-app' |
||||
''; |
||||
}; |
||||
} |
@ -0,0 +1 @@ |
||||
{ targets-darwin = ./darwin.nix; } |
Loading…
Reference in new issue