0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-20 09:00:41 +03:00
nixpkgs/nixos/modules/services/x11/window-managers/fvwm2.nix

52 lines
922 B
Nix
Raw Normal View History

{
config,
lib,
pkgs,
...
}:
2022-07-28 01:42:45 -03:00
with lib;
let
cfg = config.services.xserver.windowManager.fvwm2;
fvwm2 = pkgs.fvwm2.override { enableGestures = cfg.gestures; };
in
{
imports = [
(mkRenamedOptionModule
[ "services" "xserver" "windowManager" "fvwm" ]
[ "services" "xserver" "windowManager" "fvwm2" ]
)
2022-07-28 01:42:45 -03:00
];
###### interface
options = {
services.xserver.windowManager.fvwm2 = {
enable = mkEnableOption "Fvwm2 window manager";
2022-07-28 01:42:45 -03:00
gestures = mkOption {
default = false;
type = types.bool;
description = "Whether or not to enable libstroke for gesture support";
2022-07-28 01:42:45 -03:00
};
};
};
###### implementation
config = mkIf cfg.enable {
services.xserver.windowManager.session = singleton {
name = "fvwm2";
start = ''
${fvwm2}/bin/fvwm &
waitPID=$!
'';
};
2022-07-28 01:42:45 -03:00
environment.systemPackages = [ fvwm2 ];
};
}