1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-07 01:21:03 +01:00
home-manager/tests/modules/programs/aerospace/aerospace.nix
Austin Horstman c9d8158bc5 tests/aerospace: test launchd agent
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-23 20:30:43 -05:00

46 lines
1 KiB
Nix

{ 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;
userSettings = {
gaps = {
outer.left = 8;
outer.bottom = 8;
outer.top = 8;
outer.right = 8;
};
mode.main.binding = {
alt-h = "focus left";
alt-j = "focus down";
alt-k = "focus up";
alt-l = "focus right";
};
};
};
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}
'';
}