1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

tests/aerospace: test launchd agent

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2025-06-23 16:36:56 -05:00
parent d33444e63a
commit c9d8158bc5
2 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>org.nix-community.home.aerospace</string>
<key>Program</key>
<string>/nix/store/00000000000000000000000000000000-aerospace/Applications/AeroSpace.app/Contents/MacOS/AeroSpace</string>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/tmp/aerospace.err.log</string>
<key>StandardOutPath</key>
<string>/tmp/aerospace.log</string>
</dict>
</plist>

View file

@ -1,6 +1,22 @@
{ config, pkgs, ... }:
let
hmPkgs = pkgs.extend (
self: super: {
aerospace = config.lib.test.mkStubPackage {
name = "aerospace";
buildScript = ''
mkdir -p $out/bin
touch $out/bin/aerospace
chmod 755 $out/bin/aerospace
'';
};
}
);
in
{
programs.aerospace = {
enable = true;
package = hmPkgs.aerospace;
launchd.enable = true;
@ -22,5 +38,9 @@
nmt.script = ''
assertFileContent home-files/.config/aerospace/aerospace.toml ${./settings-expected.toml}
serviceFile=$(normalizeStorePaths LaunchAgents/org.nix-community.home.aerospace.plist)
assertFileExists $serviceFile
assertFileContent "$serviceFile" ${./aerospace-service-expected.plist}
'';
}