vuls: init at 0.27.0
[NixPkgs.git] / nixos / modules / services / x11 / window-managers / dwm.nix
blobc81a834a067965c636a51bf992687b8df69203cd
1 { config, lib, pkgs, ... }:
3 with lib;
5 let
7   cfg = config.services.xserver.windowManager.dwm;
9 in
13   ###### interface
15   options = {
16     services.xserver.windowManager.dwm = {
17       enable = mkEnableOption "dwm";
18       package = mkPackageOption pkgs "dwm" {
19         example = ''
20           pkgs.dwm.overrideAttrs (oldAttrs: rec {
21             patches = [
22               (super.fetchpatch {
23                 url = "https://dwm.suckless.org/patches/steam/dwm-steam-6.2.diff";
24                 sha256 = "sha256-f3lffBjz7+0Khyn9c9orzReoLTqBb/9gVGshYARGdVc=";
25               })
26             ];
27           })
28         '';
29       };
30     };
31   };
34   ###### implementation
36   config = mkIf cfg.enable {
38     services.xserver.windowManager.session = singleton
39       { name = "dwm";
40         start =
41           ''
42             export _JAVA_AWT_WM_NONREPARENTING=1
43             dwm &
44             waitPID=$!
45           '';
46       };
48     environment.systemPackages = [ cfg.package ];
50   };