dotfiles/modules/darwin/utilities.nix

54 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2022-10-26 00:22:17 +00:00
{ config, pkgs, lib, ... }:
let
# Quickly package shell scripts with their dependencies
# From https://discourse.nixos.org/t/how-to-create-a-script-with-dependencies/7970/6
mkScript = { name, file, env ? [ ] }:
pkgs.writeScriptBin name ''
for i in ${lib.concatStringsSep " " env}; do
export PATH="$i/bin:$PATH"
done
exec ${pkgs.bash}/bin/bash ${file} $@
'';
in {
2022-06-14 03:43:49 +00:00
home-manager.users.${config.user} = {
2022-06-18 17:17:11 +00:00
home.packages = with pkgs; [
# visidata # CSV inspector
2022-06-14 03:43:49 +00:00
dos2unix # Convert Windows text files
inetutils # Includes telnet
youtube-dl # Convert web videos
pandoc # Convert text documents
mpd # TUI slideshows
awscli2
awslogs
2022-09-21 20:58:04 +00:00
google-cloud-sdk
ansible
vault
consul
2022-06-14 03:43:49 +00:00
noti # Create notifications programmatically
2022-10-07 03:31:14 +00:00
ipcalc # Make IP network calculations
2022-10-26 00:22:17 +00:00
(mkScript {
name = "ocr";
file = ../shell/bash/scripts/ocr.sh;
env = [ tesseract ];
})
2022-06-14 03:43:49 +00:00
];
2022-06-21 21:51:27 +00:00
programs.fish.shellAbbrs = {
# Add noti for ghpr in Darwin
ghpr = lib.mkForce "gh pr create && sleep 3 && noti gh run watch";
2022-08-15 02:43:10 +00:00
grw = lib.mkForce "noti gh run watch";
2022-07-26 03:15:26 +00:00
# Shortcut to edit hosts file
hosts = "sudo nvim /etc/hosts";
2022-06-21 21:51:27 +00:00
};
2022-06-18 17:17:11 +00:00
};
2022-06-14 03:43:49 +00:00
}