about summary refs log tree commit diff
path: root/home/wm/default.nix
blob: 0125dd1253663bcf776448bd3c066053062907ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ 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" ]; };
  };
}