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.

59 lines
1.2 KiB
Nix
Raw Normal View History

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 =
''
export _JAVA_AWT_WM_NONREPARENTING=1
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
};
}