2022-02-07 17:29:52 +01:00
|
|
|
# //users/tazjin-specific CI configuration.
|
2022-05-09 13:35:55 +02:00
|
|
|
{ depot, pkgs, ... }:
|
2022-02-07 17:29:52 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
rustfmt = pkgs.writeShellScript "rustfmt-tazjin" ''
|
|
|
|
${pkgs.fd}/bin/fd -e rs | \
|
|
|
|
${pkgs.ripgrep}/bin/rg 'users/tazjin' | \
|
|
|
|
xargs ${pkgs.rustfmt}/bin/rustfmt --check --config-path users/tazjin
|
|
|
|
'';
|
|
|
|
|
|
|
|
in
|
2022-05-09 13:35:55 +02:00
|
|
|
depot.nix.readTree.drvTargets {
|
|
|
|
rustfmt = rustfmt.overrideAttrs (_: {
|
|
|
|
# rustfmt not respecting config atm, disable
|
|
|
|
meta.ci.skip = true;
|
2022-03-31 18:40:08 +02:00
|
|
|
|
2022-05-09 13:35:55 +02:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
}
|