about summary refs log tree commit diff
path: root/home/wm/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home/wm/default.nix')
-rw-r--r--home/wm/default.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/home/wm/default.nix b/home/wm/default.nix
new file mode 100644
index 0000000..27a8bf4
--- /dev/null
+++ b/home/wm/default.nix
@@ -0,0 +1,19 @@
+{ config, lib, pkgs, ... }:
+let
+  mkRelatedOption = description: relatedWMs:
+    let isActivatedWm = wm: config.my.home.wm.windowManager == wm;
+    in (lib.mkEnableOption description) // {
+      default = builtins.any isActivatedWm relatedWMs;
+    };
+in {
+  imports = [ ./sway ./waybar ./mako ./swaylock ./wofi ./gammastep ];
+  options.my.home.wm = with lib; {
+    windowManager = mkOption {
+      type = with types; nullOr (enum [ "sway" ]);
+      default = null;
+      example = "sway";
+      description = "Which window manager to use for home session";
+    };
+    waybar = { enable = mkRelatedOption "waybar configuration" [ "sway" ]; };
+  };
+}