summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/zsh/default.nix1
-rw-r--r--home/zsh/watch-while.nix25
2 files changed, 0 insertions, 26 deletions
diff --git a/home/zsh/default.nix b/home/zsh/default.nix
index 284812b..31796a9 100644
--- a/home/zsh/default.nix
+++ b/home/zsh/default.nix
@@ -2,7 +2,6 @@
imports = [
./plugins.nix
./editing.nix
- ./watch-while.nix
];
programs.zsh = {
diff --git a/home/zsh/watch-while.nix b/home/zsh/watch-while.nix
deleted file mode 100644
index ec42e13..0000000
--- a/home/zsh/watch-while.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-# This module configures some ZSH aliases such that 'watch-while' is invoked
-{
- pkgs,
- lib,
- ...
-}: let
- # Program to invoke for long-running commands.
- pkg = pkgs.watch-while;
-
- # Prorams to wrap with watch-while.
- toWrap = ["nixos-rebuild" "darwin-rebuild" "nmap"];
-in {
- # Alias long-running commands to their prefixed versions. These aliases are
- # only loaded for interactive use, so they won't mess with scripts.
- programs.zsh.shellAliases =
- lib.genAttrs toWrap (p: "${pkg}/bin/${pkg.pname} ${p}")
- # Enable alias expansion after sudo with this trick.
- // {
- "sudo" = "sudo ";
- "ww" = "watch-while ";
- };
-
- # Also add the program to the environment for manual invocation.
- home.packages = [pkg];
-}