From c7944a4cf8a840bd16e0df72de877a5505c40890 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Wed, 17 May 2023 08:13:45 -0600 Subject: [PATCH] bins/rpr: fix gh functionality and add hut support --- bins/rpr.nix | 11 ++++++++--- gui/default.nix | 7 ++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/bins/rpr.nix b/bins/rpr.nix index 222e8b0..1321bdf 100644 --- a/bins/rpr.nix +++ b/bins/rpr.nix @@ -1,15 +1,17 @@ -{ tea, gh, _1password }: +{ tea, gh, _1password, hut }: let teaBin = "${tea}/bin/tea"; ghBin = "${gh}/bin/gh"; - opBin = "${_1password}/bin/op"; + htBin = "${hut}/bin/hut"; in '' #!/usr/bin/env sh set -eu + source ~/.config/op/plugins.sh + proj="$(basename $PWD)" for login in $(${teaBin} logins list -o simple | awk '{print $1}'); do @@ -18,6 +20,9 @@ in '' done # ${ghBin} - ${opBin} plugin run -- gh repo create --public "$proj" || echo "error creating '$proj' on 'github'" + gh repo create --public "$proj" || echo "error creating '$proj' on 'github'" + + # ${htBin} + ${htBin} git create "$proj" || echo "error creating '$proj' on 'sr.ht'" '' diff --git a/gui/default.nix b/gui/default.nix index af183a9..e79bfdd 100644 --- a/gui/default.nix +++ b/gui/default.nix @@ -1,11 +1,8 @@ { config, lib, pkgs, xinlib, ... }: let rage = pkgs.writeScriptBin "rage" (import ../bins/rage.nix { inherit pkgs; }); - rpr = pkgs.writeScriptBin "rpr" (import ../bins/rpr.nix { - inherit (pkgs) _1password; - inherit (pkgs) gh; - inherit (pkgs) tea; - }); + rpr = pkgs.writeScriptBin "rpr" + (import ../bins/rpr.nix { inherit (pkgs) _1password hut gh tea; }); promnesia = pkgs.python3Packages.callPackage ../pkgs/promnesia.nix { inherit pkgs; }; hpi = pkgs.python3Packages.callPackage ../pkgs/hpi.nix { inherit pkgs; };