bins/rpr: fix gh functionality and add hut support

This commit is contained in:
Aaron Bieber 2023-05-17 08:13:45 -06:00
parent 203c04d69e
commit c7944a4cf8
No known key found for this signature in database
2 changed files with 10 additions and 8 deletions

View File

@ -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'"
''

View File

@ -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; };