blob: 6a671296de5c8648cf7d97ec1f8e91a5bc7b12d0 (
plain) (
tree)
|
|
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.packages;
album-to-nas = pkgs.writeShellScriptBin "album-to-nas" ''
set -euo pipefail
ALBUM_PATH="''${1}"
ALBUM_NAME=$(basename "''${ALBUM_PATH}")
NAS=$(${pkgs.tailscale}/bin/tailscale status --json | ${pkgs.jq}/bin/jq -r '.Peer | map(select(.HostName == "tahoe"))[0].TailscaleIPs[0]')
scp "''${ALBUM_PATH}" "''${NAS}:~/import/album.zip"
ssh "''${NAS}" bc-to-beet ~/import/album.zip
'';
in
{
options.my.home.packages = with lib; {
enable = mkEnableOption "user packages";
additionalPackages = mkOption {
type = with types; listOf package;
default = [ ];
example = literalExample ''
with pkgs; [
pavucontrol
]
'';
};
};
config.home.packages = with pkgs;
lib.mkIf cfg.enable
([
dive # explore layers in docker images
jq
restic # in order to interact with my backups
ripgrep
util-linux
# custom tools
album-to-nas
# tools inside the tools directory
tools.gha-billing
tools.git-blame-stats
tools.git-broom
tools.ipconverter
tools.seqstat
# tools from external repositories
# x509-info
# gh-ssh-keys
# masked-emails
]
++ cfg.additionalPackages);
}
|