bins: initial bits for rpr
This commit is contained in:
parent
d673020964
commit
f097cbf577
@ -12,13 +12,19 @@ let
|
|||||||
inherit gosignify;
|
inherit gosignify;
|
||||||
inherit (pkgs) curl;
|
inherit (pkgs) curl;
|
||||||
});
|
});
|
||||||
|
rpr = pkgs.writeScriptBin "rpr" (import ./rpr.nix {
|
||||||
|
inherit (pkgs) _1password;
|
||||||
|
inherit (pkgs) gh;
|
||||||
|
inherit (pkgs) tea;
|
||||||
|
});
|
||||||
|
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
checkRestart
|
||||||
ix
|
ix
|
||||||
|
#rpr
|
||||||
sfetch
|
sfetch
|
||||||
xclip
|
xclip
|
||||||
checkRestart
|
|
||||||
xinStatus
|
xinStatus
|
||||||
];
|
];
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
|
23
bins/rpr.nix
Normal file
23
bins/rpr.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{ tea, gh, _1password }:
|
||||||
|
|
||||||
|
let
|
||||||
|
teaBin = "${tea}/bin/tea";
|
||||||
|
ghBin = "${gh}/bin/gh";
|
||||||
|
opBin = "${_1password}/bin/op";
|
||||||
|
|
||||||
|
in ''
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
proj="$(basename $PWD)"
|
||||||
|
|
||||||
|
for login in $(${teaBin} logins list -o simple | awk '{print $1}'); do
|
||||||
|
tea logins default "$login"
|
||||||
|
tea repos create -name "$proj" || echo "error creating '$proj' on '$login'"
|
||||||
|
done
|
||||||
|
|
||||||
|
# ${ghBin}
|
||||||
|
${opBin} plugin run -- gh repo create --public "$proj" || echo "error creating '$proj' on 'github'"
|
||||||
|
|
||||||
|
''
|
Loading…
Reference in New Issue
Block a user