From 49fcac0d6b064d99ae00692763f6c638129b66d3 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 19 Aug 2014 10:40:17 -0300 Subject: [PATCH] Fluxbox: adding system support (as a module) --- nixos/modules/module-list.nix | 1 + .../services/x11/window-managers/fluxbox.nix | 28 +++++++++++++++++++ .../window-managers/fluxbox/default.nix | 10 ++----- 3 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 nixos/modules/services/x11/window-managers/fluxbox.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 453899175e01..5b1b008a270c 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -293,6 +293,7 @@ ./services/x11/window-managers/awesome.nix #./services/x11/window-managers/compiz.nix ./services/x11/window-managers/default.nix + ./services/x11/window-managers/fluxbox.nix ./services/x11/window-managers/icewm.nix ./services/x11/window-managers/bspwm.nix ./services/x11/window-managers/metacity.nix diff --git a/nixos/modules/services/x11/window-managers/fluxbox.nix b/nixos/modules/services/x11/window-managers/fluxbox.nix new file mode 100644 index 000000000000..4748ce99ccf2 --- /dev/null +++ b/nixos/modules/services/x11/window-managers/fluxbox.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.services.xserver.windowManager.fluxbox; +in +{ + ###### interface + options = { + services.xserver.windowManager.fluxbox.enable = mkOption { + default = false; + description = "Enable the Fluxbox window manager."; + }; + }; + + ###### implementation + config = mkIf cfg.enable { + services.xserver.windowManager.session = singleton { + name = "fluxbox"; + start = '' + ${pkgs.fluxbox}/bin/startfluxbox & + waitPID=$! + ''; + }; + environment.systemPackages = [ pkgs.fluxbox ]; + }; +} diff --git a/pkgs/applications/window-managers/fluxbox/default.nix b/pkgs/applications/window-managers/fluxbox/default.nix index 6c91e773376f..af6545b61515 100644 --- a/pkgs/applications/window-managers/fluxbox/default.nix +++ b/pkgs/applications/window-managers/fluxbox/default.nix @@ -10,13 +10,7 @@ stdenv.mkDerivation rec { name = "fluxbox-${version}"; version = "1.3.5"; - buildInputs = [ - pkgconfig - freetype fribidi - libXext libXft libXpm libXrandr libXrender xextproto - libXinerama - imlib2 - ]; + buildInputs = [ pkgconfig freetype fribidi libXext libXft libXpm libXrandr libXrender xextproto libXinerama imlib2 ]; src = fetchurl { url = "mirror://sourceforge/fluxbox/${name}.tar.bz2"; @@ -24,7 +18,7 @@ stdenv.mkDerivation rec { }; meta = { - description = "Full-featured, light-resource X window manager."; + description = "Full-featured, light-resource X window manager"; longDescription = '' Fluxbox is a X window manager based on Blackbox 0.61.1 window manager sources. It is very light on resources and easy to handle but yet full of features to make an easy,