bins/rpr: fix gh functionality and add hut support
This commit is contained in:
parent
203c04d69e
commit
c7944a4cf8
11
bins/rpr.nix
11
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'"
|
||||
|
||||
''
|
||||
|
@ -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; };
|
||||
|
Loading…
Reference in New Issue
Block a user