diff options
-rw-r--r-- | home/default.nix | 1 | ||||
-rw-r--r-- | home/dev-utils/default.nix | 2 | ||||
-rw-r--r-- | home/networking-utils/default.nix | 10 | ||||
-rw-r--r-- | home/zsh/watch-while.nix | 5 |
4 files changed, 14 insertions, 4 deletions
diff --git a/home/default.nix b/home/default.nix index 8a813cb..93c3720 100644 --- a/home/default.nix +++ b/home/default.nix @@ -21,6 +21,7 @@ ./zsh ./git ./dev-utils + ./networking-utils ./iterm2 ./noweb ] diff --git a/home/dev-utils/default.nix b/home/dev-utils/default.nix index d49b9dd..7ed56a4 100644 --- a/home/dev-utils/default.nix +++ b/home/dev-utils/default.nix @@ -1,3 +1,4 @@ +# This part (module) of my home manager configuration adds some random utilities. { pkgs, lib, @@ -8,7 +9,6 @@ # smol utils nodePackages_latest.nodemon rlwrap - socat # heavy hitters imagemagick diff --git a/home/networking-utils/default.nix b/home/networking-utils/default.nix new file mode 100644 index 0000000..70802a9 --- /dev/null +++ b/home/networking-utils/default.nix @@ -0,0 +1,10 @@ +# This module adds some networking utilities to my home managed environment. +{pkgs, ...}: { + home.packages = with pkgs; + [ + nmap + inetutils + socat + ] + ++ lib.optional (!pkgs.stdenv.isDarwin) netcat; +} diff --git a/home/zsh/watch-while.nix b/home/zsh/watch-while.nix index 87e2bbc..ec42e13 100644 --- a/home/zsh/watch-while.nix +++ b/home/zsh/watch-while.nix @@ -6,15 +6,14 @@ }: let # Program to invoke for long-running commands. pkg = pkgs.watch-while; - exec = "${pkg}/bin/watch-while"; # Prorams to wrap with watch-while. - toWrap = ["nixos-rebuild" "darwin-rebuild"]; + 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: "${exec} ${p}") + lib.genAttrs toWrap (p: "${pkg}/bin/${pkg.pname} ${p}") # Enable alias expansion after sudo with this trick. // { "sudo" = "sudo "; |