From 16c0a24cade26ec912e6d47c0035a7c387dd6f6f Mon Sep 17 00:00:00 2001 From: Antono Vasiljev Date: Sun, 1 Sep 2013 21:18:48 +0300 Subject: [PATCH] Openbox --- .../services/x11/window-managers/default.nix | 1 + .../services/x11/window-managers/openbox.nix | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 modules/services/x11/window-managers/openbox.nix diff --git a/modules/services/x11/window-managers/default.nix b/modules/services/x11/window-managers/default.nix index de0cbd5c599e..958bf85817e9 100644 --- a/modules/services/x11/window-managers/default.nix +++ b/modules/services/x11/window-managers/default.nix @@ -8,6 +8,7 @@ in { imports = [ ./compiz.nix + ./openbox.nix ./kwm.nix ./metacity.nix ./none.nix diff --git a/modules/services/x11/window-managers/openbox.nix b/modules/services/x11/window-managers/openbox.nix new file mode 100644 index 000000000000..ae34a938c4a0 --- /dev/null +++ b/modules/services/x11/window-managers/openbox.nix @@ -0,0 +1,30 @@ +{pkgs, config, ...}: + +let + inherit (pkgs.lib) mkOption mkIf; + cfg = config.services.xserver.windowManager.openbox; +in + +{ + options = { + services.xserver.windowManager.openbox = { + enable = mkOption { + default = false; + example = true; + description = "Enable the Openbox window manager."; + }; + }; + }; + + config = mkIf cfg.enable { + services.xserver.windowManager = { + session = [{ + name = "openbox"; + start = " + ${pkgs.openbox}/bin/openbox-session + "; + }]; + }; + environment.x11Packages = [ pkgs.openbox ]; + }; +}