1{ config, lib, ... }:
2
3with lib;
4
5let
6 cfg = config.services.xserver.windowManager;
7in
8
9{
10 imports = [
11 ./2bwm.nix
12 ./afterstep.nix
13 ./berry.nix
14 ./bspwm.nix
15 ./cwm.nix
16 ./clfswm.nix
17 ./dwm.nix
18 ./e16.nix
19 ./evilwm.nix
20 ./exwm.nix
21 ./fluxbox.nix
22 ./fvwm2.nix
23 ./fvwm3.nix
24 ./hackedbox.nix
25 ./herbstluftwm.nix
26 ./hypr.nix
27 ./i3.nix
28 ./jwm.nix
29 ./leftwm.nix
30 ./lwm.nix
31 ./metacity.nix
32 ./mlvwm.nix
33 ./mwm.nix
34 ./openbox.nix
35 ./pekwm.nix
36 ./notion.nix
37 ./ratpoison.nix
38 ./sawfish.nix
39 ./smallwm.nix
40 ./stumpwm.nix
41 ./spectrwm.nix
42 ./tinywm.nix
43 ./twm.nix
44 ./windowmaker.nix
45 ./wmderland.nix
46 ./wmii.nix
47 ./xmonad.nix
48 ./yeahwm.nix
49 ./qtile.nix
50 ./none.nix ];
51
52 options = {
53
54 services.xserver.windowManager = {
55
56 session = mkOption {
57 internal = true;
58 default = [];
59 example = [{
60 name = "wmii";
61 start = "...";
62 }];
63 description = lib.mdDoc ''
64 Internal option used to add some common line to window manager
65 scripts before forwarding the value to the
66 `displayManager`.
67 '';
68 apply = map (d: d // {
69 manage = "window";
70 });
71 };
72
73 default = mkOption {
74 type = types.nullOr types.str;
75 default = null;
76 example = "wmii";
77 description = lib.mdDoc ''
78 **Deprecated**, please use [](#opt-services.xserver.displayManager.defaultSession) instead.
79
80 Default window manager loaded if none have been chosen.
81 '';
82 };
83
84 };
85
86 };
87
88 config = {
89 services.xserver.displayManager.session = cfg.session;
90 };
91}