summary refs log blame commit diff
path: root/nixos/modules/services/x11/window-managers/fvwm.nix
blob: e283886ecc400b0b553c8c017ad2445ef70d3c9f (plain) (tree)
1
2
3
4
5
6
7





                                                   
                                                               

































                                                                               
{ config, lib, pkgs, ... }:

with lib;

let
  cfg = config.services.xserver.windowManager.fvwm;
  fvwm = pkgs.fvwm.override { enableGestures = cfg.gestures; };
in

{

  ###### interface

  options = {
    services.xserver.windowManager.fvwm = {
      enable = mkEnableOption "Fvwm window manager";

      gestures = mkOption {
        default = false;
        type = types.bool;
        description = "Whether or not to enable libstroke for gesture support";
      };
    };
  };


  ###### implementation

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

    environment.systemPackages = [ fvwm ];
  };
}