summary refs log tree commit diff
path: root/modules/services/x11/window-managers/openbox.nix
blob: ae34a938c4a04434127862dd6241b7a6426ef88c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{pkgs, config, ...}:

let
  inherit (pkgs.lib) mkOption mkIf;
  cfg = config.services.xserver.windowManager.openbox;
in

{
  options = {
    services.xserver.windowManager.openbox = {
      enable = mkOption {
        default = false;
        example = true;
        description = "Enable the Openbox window manager.";
      };
    };
  };

  config = mkIf cfg.enable {
    services.xserver.windowManager = {
      session = [{
        name = "openbox";
        start = "
          ${pkgs.openbox}/bin/openbox-session
        ";
      }];
    };
    environment.x11Packages = [ pkgs.openbox ];
  };
}