targets.darwin: add module
Currently, this module makes sure that `/Applications` directories for packages in `home.packages` get linked into the user's environment.
This commit is contained in:
parent
bd4c2b0651
commit
d3aee544b6
7 changed files with 39 additions and 1 deletions
20
tests/modules/targets-darwin/darwin.nix
Normal file
20
tests/modules/targets-darwin/darwin.nix
Normal file
|
|
@ -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'
|
||||
'';
|
||||
};
|
||||
}
|
||||
1
tests/modules/targets-darwin/default.nix
Normal file
1
tests/modules/targets-darwin/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ targets-darwin = ./darwin.nix; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue