From c5511f9849bd5d9036f4555b94071adbae79eb4e Mon Sep 17 00:00:00 2001 From: mdheller <21163552+mdheller@users.noreply.github.com> Date: Fri, 24 Apr 2026 07:17:15 -0400 Subject: [PATCH] test(workstation): add mac-like GNOME defaults contract check --- tests/workstation-mac-defaults-contract.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/workstation-mac-defaults-contract.nix diff --git a/tests/workstation-mac-defaults-contract.nix b/tests/workstation-mac-defaults-contract.nix new file mode 100644 index 0000000..717974d --- /dev/null +++ b/tests/workstation-mac-defaults-contract.nix @@ -0,0 +1,16 @@ +{ pkgs ? import {} }: +pkgs.runCommand "workstation-mac-defaults-contract" { + nativeBuildInputs = [ pkgs.gnugrep ]; +} '' + test -f ${../profiles/linux-dev/workstation-v0/gnome/mac-defaults.sh} + grep -q "enable-hot-corners false" ${../profiles/linux-dev/workstation-v0/gnome/mac-defaults.sh} + grep -q "clock-format '12h'" ${../profiles/linux-dev/workstation-v0/gnome/mac-defaults.sh} + grep -q "locate-pointer true" ${../profiles/linux-dev/workstation-v0/gnome/mac-defaults.sh} + grep -q "click-policy 'double'" ${../profiles/linux-dev/workstation-v0/gnome/mac-defaults.sh} + grep -q "show-delete-permanently true" ${../profiles/linux-dev/workstation-v0/gnome/mac-defaults.sh} + grep -q "favorite-apps" ${../profiles/linux-dev/workstation-v0/gnome/mac-defaults.sh} + grep -q 'set_custom_binding custom1 "SourceOS Files"' ${../profiles/linux-dev/workstation-v0/gnome/mac-defaults.sh} + grep -q 'set_custom_binding custom2 "SourceOS Terminal"' ${../profiles/linux-dev/workstation-v0/gnome/mac-defaults.sh} + mkdir -p $out + echo validated > $out/result.txt +''