summary refs log tree commit diff
path: root/nixos/modules/services/x11/window-managers/tinywm.nix
blob: 8e5d9b9170caba57a598e9d9728c967bd7286276 (plain) (blame)
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.services.xserver.windowManager.tinywm;
in
{
  ###### interface
  options = {
    services.xserver.windowManager.tinywm.enable = mkEnableOption "tinywm";
  };

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