about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/x11/window-managers/fvwm3.nix
blob: 50c76b67eea34ec3234434fc3d5e2de1d5b9c503 (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
26
27
28
29
30
31
32
33
34
35
{ config, lib, pkgs, ... }:

with lib;

let
  cfg = config.services.xserver.windowManager.fvwm3;
  inherit (pkgs) fvwm3;
in

{

  ###### interface

  options = {
    services.xserver.windowManager.fvwm3 = {
      enable = mkEnableOption (lib.mdDoc "Fvwm3 window manager");
    };
  };


  ###### implementation

  config = mkIf cfg.enable {
    services.xserver.windowManager.session = singleton
      { name = "fvwm3";
        start =
          ''
            ${fvwm3}/bin/fvwm3 &
            waitPID=$!
          '';
      };

    environment.systemPackages = [ fvwm3 ];
  };
}