1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-20 00:19:25 +03:00
nixpkgs/nixos/modules/services/x11/window-managers/dwm.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
981 B
Nix
Raw Normal View History

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