diff --git a/modules/services/window-managers/bspwm/options.nix b/modules/services/window-managers/bspwm/options.nix
index 57a1d874a..441b49682 100644
--- a/modules/services/window-managers/bspwm/options.nix
+++ b/modules/services/window-managers/bspwm/options.nix
@@ -4,7 +4,11 @@ with lib;
let
+ primitive = with types; oneOf [ bool int float str ];
+
rule = types.submodule {
+ freeformType = with types; attrsOf primitive;
+
options = {
monitor = mkOption {
type = types.nullOr types.str;
@@ -139,6 +143,14 @@ let
description = "Whether the node should have border.";
example = true;
};
+
+ rectangle = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ description =
+ "The node's geometry, in the format WxH+X+Y.";
+ example = "800x600+32+32";
+ };
};
};
@@ -155,9 +167,7 @@ in {
};
settings = mkOption {
- type = with types;
- let primitive = either bool (either int (either float str));
- in attrsOf (either primitive (listOf primitive));
+ type = with types; attrsOf (either primitive (listOf primitive));
default = { };
description = "General settings given to bspc config.";
example = {
diff --git a/tests/modules/services/window-managers/bspwm/bspwmrc b/tests/modules/services/window-managers/bspwm/bspwmrc
index ba0da830a..2f669b830 100755
--- a/tests/modules/services/window-managers/bspwm/bspwmrc
+++ b/tests/modules/services/window-managers/bspwm/bspwmrc
@@ -9,7 +9,7 @@ bspc config 'ignore_ewmh_fullscreen' 'enter,exit'
bspc config 'split_ratio' '0.520000'
bspc rule -r '*'
-bspc rule -a '*' 'center=off' 'desktop=d'\''esk top#next' 'split_dir=north' 'sticky=on'
+bspc rule -a '*' 'center=off' 'desktop=d'\''esk top#next' 'split_dir=north' 'sticky=on' 'unknown_rule=42'
# java gui fixes
export _JAVA_AWT_WM_NONREPARENTING=1
diff --git a/tests/modules/services/window-managers/bspwm/configuration.nix b/tests/modules/services/window-managers/bspwm/configuration.nix
index e4aec0f6c..577645bfa 100644
--- a/tests/modules/services/window-managers/bspwm/configuration.nix
+++ b/tests/modules/services/window-managers/bspwm/configuration.nix
@@ -22,6 +22,7 @@ with lib;
desktop = "d'esk top#next";
splitDir = "north";
border = null;
+ unknownRule = 42;
};
extraConfig = ''
extra config