summaryrefslogtreecommitdiff
path: root/nixos/modules/programs/dwm.nix
blob: 5f6b5e0ead661647b55f851166efe5d966e6d5b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ config, lib, pkgs, ... }:
with lib;

let
  cfg = config.eth.programs.dwm;

in {
  options.eth.programs.dwm = {
    enable = mkEnableOption "Whether to enable dwm";
  };

  config = mkIf cfg.enable {
    environment.systemPackages = with pkgs; [
      dmenu
      eth.dwm
    ];
    services.xserver.windowManager.session = singleton {
      name = "dwm";
      start = ''
        ${pkgs.eth.dwm}/bin/dwm &
        waitPID=$!
      '';
    };
  };
}