Merge branch 'main' into teutat3s

This commit is contained in:
teutat3s 2022-06-04 14:05:09 +02:00
commit a79cb4f592
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
3 changed files with 33 additions and 1 deletions

View file

@ -26,7 +26,6 @@ in
home.packages = [
ack
asciinema
asciinema
bat
exa
fd

View file

@ -17,6 +17,7 @@ with final; {
toggle-kbd-layout = writeShellScriptBin "toggle-kbd-layout" (import ./toggle-kbd-layout.nix final);
uhk-agent = import ./uhk-agent.nix final;
wcwd = writeShellScriptBin "wcwd" (import ./wcwd.nix final);
drone-docker-runner = writeShellScriptBin "drone-docker-runner" (import ./drone-docker-runner.nix final);
# ps-fixes
ps-signal-desktop = writeShellScriptBin "signal-desktop" (import ./ps-signal-desktop.nix final);

View file

@ -0,0 +1,32 @@
self: with self; ''
case $1 in
start)
${self.docker}/bin/docker run --detach \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--env=DRONE_RPC_PROTO=$DRONE_RPC_PROTO \
--env=DRONE_RPC_HOST=$DRONE_RPC_HOST \
--env=DRONE_RPC_SECRET=$(${self.libsecret}/bin/secret-tool lookup drone rpc-secret) \
--env=DRONE_RUNNER_CAPACITY=4 \
--env=DRONE_RUNNER_NAME=$(${self.inetutils}/bin/hostname) \
--publish=3000:3000 \
--restart=always \
--name=drone-runner \
drone/drone-runner-docker:1
;;
stop)
${self.docker}/bin/docker stop drone-runner
${self.docker}/bin/docker rm drone-runner
;;
logs)
${self.docker}/bin/docker logs drone-runner
;;
*)
echo "Usage: drone-docker-runner <start|stop|logs>"
exit 1;
;;
esac
''