mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
tests/aerospace: test launchd agent
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
@@ -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>
|
||||
@@ -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}
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user