about summary refs log tree commit diff
path: root/users/tazjin/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/tazjin/default.nix')
-rw-r--r--users/tazjin/default.nix27
1 files changed, 19 insertions, 8 deletions
diff --git a/users/tazjin/default.nix b/users/tazjin/default.nix
index 8359b2de3275..1b68b7127a72 100644
--- a/users/tazjin/default.nix
+++ b/users/tazjin/default.nix
@@ -1,5 +1,5 @@
 # //users/tazjin-specific CI configuration.
-{ pkgs, ... }:
+{ depot, pkgs, ... }:
 
 let
   rustfmt = pkgs.writeShellScript "rustfmt-tazjin" ''
@@ -9,11 +9,22 @@ let
   '';
 
 in
-rustfmt.overrideAttrs (_: {
-  # rustfmt not respecting config atm, disable
-  meta.ci.skip = true;
+depot.nix.readTree.drvTargets {
+  rustfmt = rustfmt.overrideAttrs (_: {
+    # rustfmt not respecting config atm, disable
+    meta.ci.skip = true;
 
-  meta.ci.extraSteps.rustfmt = {
-    command = rustfmt;
-  };
-})
+    meta.ci.extraSteps.rustfmt = {
+      command = rustfmt;
+    };
+  });
+
+  # Use a screen lock command that resets the keyboard layout
+  # before locking, to avoid locking me out when the layout is
+  # in Russian.
+  screenLock = pkgs.writeShellScriptBin "tazjin-screen-lock" ''
+    ${pkgs.xorg.setxkbmap}/bin/setxkbmap us
+    ${pkgs.xorg.setxkbmap}/bin/setxkbmap -option caps:super
+    exec ${pkgs.xsecurelock}/bin/xsecurelock
+  '';
+}