From c30bd387d262571712c58debd02394898b971574 Mon Sep 17 00:00:00 2001 From: Markus Schneider Date: Thu, 23 May 2019 17:08:44 +0200 Subject: [PATCH] leftwm: enable service --- .../services/x11/window-managers/default.nix | 1 + .../services/x11/window-managers/leftwm.nix | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 nixos/modules/services/x11/window-managers/leftwm.nix diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix index 06c59342b45a..2a1f22fa9a4c 100644 --- a/nixos/modules/services/x11/window-managers/default.nix +++ b/nixos/modules/services/x11/window-managers/default.nix @@ -19,6 +19,7 @@ in ./herbstluftwm.nix ./i3.nix ./jwm.nix + ./leftwm.nix ./metacity.nix ./mwm.nix ./openbox.nix diff --git a/nixos/modules/services/x11/window-managers/leftwm.nix b/nixos/modules/services/x11/window-managers/leftwm.nix new file mode 100644 index 000000000000..3ef40df95df2 --- /dev/null +++ b/nixos/modules/services/x11/window-managers/leftwm.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.xserver.windowManager.leftwm; +in +{ + ###### interface + options = { + services.xserver.windowManager.leftwm.enable = mkEnableOption "leftwm"; + }; + + ###### implementation + config = mkIf cfg.enable { + services.xserver.windowManager.session = singleton { + name = "leftwm"; + start = '' + ${pkgs.leftwm}/bin/leftwm & + waitPID=$! + ''; + }; + environment.systemPackages = [ pkgs.leftwm ]; + }; +}