about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/x11/window-managers/2bwm.nix
blob: 8483a74b9f6c8b5d2d2c12909db1b15b5788ad5c (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 (lib.mdDoc "2bwm");
  };


  ###### implementation

  config = mkIf cfg.enable {

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

    environment.systemPackages = [ pkgs._2bwm ];

  };

}