2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.xserver.windowManager.dwm;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
2022-10-21 18:38:19 +00:00
|
|
|
services.xserver.windowManager.dwm = {
|
|
|
|
enable = mkEnableOption (lib.mdDoc "dwm");
|
2024-01-02 11:29:13 +00:00
|
|
|
package = mkPackageOption pkgs "dwm" {
|
|
|
|
example = ''
|
2022-10-21 18:38:19 +00:00
|
|
|
pkgs.dwm.overrideAttrs (oldAttrs: rec {
|
|
|
|
patches = [
|
|
|
|
(super.fetchpatch {
|
|
|
|
url = "https://dwm.suckless.org/patches/steam/dwm-steam-6.2.diff";
|
2023-08-22 20:05:09 +00:00
|
|
|
sha256 = "sha256-f3lffBjz7+0Khyn9c9orzReoLTqBb/9gVGshYARGdVc=";
|
2022-10-21 18:38:19 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
})
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
services.xserver.windowManager.session = singleton
|
|
|
|
{ name = "dwm";
|
|
|
|
start =
|
|
|
|
''
|
2023-10-09 19:29:22 +00:00
|
|
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
2020-04-24 23:36:52 +00:00
|
|
|
dwm &
|
|
|
|
waitPID=$!
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
environment.systemPackages = [ cfg.package ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|