summary refs log tree commit diff
path: root/nixos/modules/services/x11/window-managers/2bwm.nix
blob: fdbdf35b0f5af402ff2f827330546d05f841b950 (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
31
32
33
34
35
36
37
{ config, lib, pkgs, ... }:

with lib;

let

  cfg = config.services.xserver.windowManager."2bwm";

in

{

  ###### interface

  options = {
    services.xserver.windowManager."2bwm".enable = mkEnableOption "2bwm";
  };


  ###### implementation

  config = mkIf cfg.enable {

    services.xserver.windowManager.session = singleton
      { name = "2bwm";
        start =
          ''
            ${pkgs._2bwm}/bin/2bwm &
            waitPID=$!
          '';
      };

    environment.systemPackages = [ pkgs._2bwm ];

  };

}