From 44a46eab2e3e849e0abadddded851d681c6b7456 Mon Sep 17 00:00:00 2001 From: Talha Can Havadar Date: Thu, 14 Nov 2024 18:59:04 +0100 Subject: [PATCH] aerospace: fix on-window-detected --- modules/services/aerospace/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/services/aerospace/default.nix b/modules/services/aerospace/default.nix index 50d47b3b5..5762a5783 100644 --- a/modules/services/aerospace/default.nix +++ b/modules/services/aerospace/default.nix @@ -10,6 +10,20 @@ let format = pkgs.formats.toml { }; configFile = format.generate "aerospace.toml" cfg.settings; + callbackConf = + with lib.types; + oneOf [ + bool + int + float + str + path + attrs + ] + // { + description = "AeroSpace config callback (bool, int, float, str, path or attrs)"; + }; + in { @@ -71,7 +85,7 @@ in description = "Default orientation for the root container."; }; on-window-detected = lib.mkOption { - type = listOf str; + type = listOf (attrsOf (either callbackConf (listOf callbackConf))); default = [ ]; description = "Commands to run every time a new window is detected."; };