2015-12-02 22:27:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.xserver.windowManager.dwm;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
2022-10-16 17:01:23 +00:00
|
|
|
services.xserver.windowManager.dwm = {
|
|
|
|
enable = mkEnableOption (lib.mdDoc "dwm");
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.dwm;
|
|
|
|
defaultText = literalExpression "pkgs.dwm";
|
|
|
|
example = literalExpression ''
|
|
|
|
pkgs.dwm.overrideAttrs (oldAttrs: rec {
|
|
|
|
patches = [
|
|
|
|
(super.fetchpatch {
|
|
|
|
url = "https://dwm.suckless.org/patches/steam/dwm-steam-6.2.diff";
|
2023-08-17 18:14:35 +00:00
|
|
|
sha256 = "sha256-f3lffBjz7+0Khyn9c9orzReoLTqBb/9gVGshYARGdVc=";
|
2022-10-16 17:01:23 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
})
|
|
|
|
'';
|
|
|
|
description = lib.mdDoc ''
|
|
|
|
dwm package to use.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2015-12-02 22:27:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
services.xserver.windowManager.session = singleton
|
|
|
|
{ name = "dwm";
|
|
|
|
start =
|
|
|
|
''
|
2023-08-22 10:56:59 +00:00
|
|
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
2019-03-11 19:18:08 +00:00
|
|
|
dwm &
|
2015-12-02 22:27:52 +00:00
|
|
|
waitPID=$!
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2022-10-16 17:01:23 +00:00
|
|
|
environment.systemPackages = [ cfg.package ];
|
2015-12-02 22:27:52 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|