summaryrefslogtreecommitdiff
path: root/nixos/modules/programs/dwm.nix
blob: c158a5e07c642789dea0a723329cfb8acc9c6e58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ 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 = [ pkgs.eth.dwm ];
    services.xserver.windowManager.session = singleton {
      name = "dwm";
      start = ''
        ${pkgs.eth.dwm}/bin/dwm &
        waitPID=$!
      '';
    };
  };
}