about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-12-11 05:28:09 +0100
committeraszlig <aszlig@redmoonstudios.org>2015-12-11 05:28:09 +0100
commit878f7bb7ee944dd0ae20b8041c34d8406cca6a67 (patch)
tree20cf194a1bc57690cb5dd24f93cf23f4eeb33539 /modules
parent90c080e455ccd8c9239b40b48960e3a99b11d928 (diff)
services/i3: Add i3 test to requiresTests.
We have that i3 dummy test in here for quite a long time, so it's
actually time that the test will mean anything (even though the test
really isn't doing anything right now).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules')
-rw-r--r--modules/user/aszlig/services/i3/default.nix44
1 files changed, 24 insertions, 20 deletions
diff --git a/modules/user/aszlig/services/i3/default.nix b/modules/user/aszlig/services/i3/default.nix
index 093ac2df..b9025766 100644
--- a/modules/user/aszlig/services/i3/default.nix
+++ b/modules/user/aszlig/services/i3/default.nix
@@ -1,4 +1,4 @@
-{ pkgs, lib, config, ... }:
+{ pkgs, tests, lib, config, ... }:
 
 with lib;
 
@@ -103,30 +103,34 @@ in
     };
   };
 
-  config.vuizvui.user.aszlig.services.i3.workspaces = defaultWorkspaces;
+  config = mkIf cfg.enable {
+    vuizvui.user.aszlig.services.i3.workspaces = defaultWorkspaces;
 
-  config.services.xserver.windowManager = mkIf cfg.enable {
-    default = "i3";
+    vuizvui.requiresTests = [ tests.vuizvui.aszlig.i3 ];
 
-    i3.enable = true;
-    i3.configFile = pkgs.substituteAll {
-      name = "i3.conf";
-      src = ./i3.conf;
+    services.xserver.windowManager = {
+      default = "i3";
 
-      inherit (pkgs) dmenu xterm;
-      inherit (pkgs.vuizvui) pvolctrl;
-      inherit (pkgs.xorg) xsetroot;
-      inherit wsConfig barConfig;
+      i3.enable = true;
+      i3.configFile = pkgs.substituteAll {
+        name = "i3.conf";
+        src = ./i3.conf;
 
-      lockall = pkgs.writeScript "lockvt.sh" ''
-        #!${pkgs.stdenv.shell}
-        "${pkgs.socat}/bin/socat" - UNIX-CONNECT:/run/console-lock.sock \
-          < /dev/null
-      '';
+        inherit (pkgs) dmenu xterm;
+        inherit (pkgs.vuizvui) pvolctrl;
+        inherit (pkgs.xorg) xsetroot;
+        inherit wsConfig barConfig;
 
-      postInstall = ''
-        ${pkgs.i3}/bin/i3 -c "$target" -C
-      '';
+        lockall = pkgs.writeScript "lockvt.sh" ''
+          #!${pkgs.stdenv.shell}
+          "${pkgs.socat}/bin/socat" - UNIX-CONNECT:/run/console-lock.sock \
+            < /dev/null
+        '';
+
+        postInstall = ''
+          ${pkgs.i3}/bin/i3 -c "$target" -C
+        '';
+      };
     };
   };
 }