diff options
Diffstat (limited to 'home/packages')
-rw-r--r-- | home/packages/default.nix | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/home/packages/default.nix b/home/packages/default.nix deleted file mode 100644 index e6e4a5b..0000000 --- a/home/packages/default.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.my.home.packages; - album-to-nas = pkgs.writeShellApplication { - name = "album-to-nas"; - runtimeInputs = [ pkgs.jq pkgs.tailscale ]; - text = '' - ALBUM_PATH="''${1}" - ALBUM_NAME=$(basename "''${ALBUM_PATH}") - - NAS=$(tailscale status --json | 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 - ''; - }; - restic-nas = pkgs.writeShellApplication - { - name = "restic-nas"; - runtimeInputs = [ pkgs.restic pkgs.tailscale pkgs.jq ]; - text = '' - NAS=$(tailscale status --json | jq -r '.Peer | map(select(.HostName == "tahoe"))[0].TailscaleIPs[0]') - - RESTIC_REPOSITORY="sftp:''${NAS}:/$(hostname)" - export RESTIC_REPOSITORY - export RESTIC_PASSWORD_FILE=/run/agenix/restic/repo-users - - sudo -E restic -o sftp.command="ssh backup@''${NAS} -i /run/agenix/restic/ssh-key -s sftp" "$@" - ''; - }; -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 - restic-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); -} |