about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@gmail.com>2014-08-19 10:40:17 -0300
committerAndersonTorres <torres.anderson.85@gmail.com>2014-08-21 07:03:37 -0300
commit49fcac0d6b064d99ae00692763f6c638129b66d3 (patch)
tree090f6a1f1033cf6c0652f009a72f3401bd4705ca
parentfe270c011ce246bb7e95a0deec9106f1a04fe8d0 (diff)
downloadnixlib-49fcac0d6b064d99ae00692763f6c638129b66d3.tar
nixlib-49fcac0d6b064d99ae00692763f6c638129b66d3.tar.gz
nixlib-49fcac0d6b064d99ae00692763f6c638129b66d3.tar.bz2
nixlib-49fcac0d6b064d99ae00692763f6c638129b66d3.tar.lz
nixlib-49fcac0d6b064d99ae00692763f6c638129b66d3.tar.xz
nixlib-49fcac0d6b064d99ae00692763f6c638129b66d3.tar.zst
nixlib-49fcac0d6b064d99ae00692763f6c638129b66d3.zip
Fluxbox: adding system support (as a module)
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/services/x11/window-managers/fluxbox.nix28
-rw-r--r--pkgs/applications/window-managers/fluxbox/default.nix10
3 files changed, 31 insertions, 8 deletions
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,