1
0

Compare commits

..

3 Commits

Author SHA1 Message Date
Flake Update Bot
2b3abf677a Update from updated-inputs-2024-08-06-01-03 2024-08-06 03:03:05 +02:00
Flake Update Bot
a34a1ca997 Update nixpkgs 2024-08-06-01-03 2024-08-06 03:03:03 +02:00
a6a87883ee pkgs/run-with-docker-group: Add script 2024-08-05 09:59:33 +02:00
4 changed files with 22 additions and 0 deletions

View File

@ -131,6 +131,7 @@
nixfiles-generate-backup-secrets
nixfiles-update-ssh-host-keys
print-afra
run-with-docker-group
ssh-gpg
update-from-hydra
uptimestatus;

View File

@ -16,6 +16,7 @@ final: prev: {
nixfiles-generate-backup-secrets = final.callPackage ./nixfiles/nixfiles-generate-backup-secrets.nix {};
nixfiles-update-ssh-host-keys = final.callPackage ./nixfiles/nixfiles-update-ssh-host-keys.nix {};
print-afra = final.callPackage ./print-afra {};
run-with-docker-group = final.callPackage ./run-with-docker-group {};
ssh-gpg = final.callPackage ./ssh-gpg {};
update-from-hydra = final.callPackage ./update-from-hydra {};
uptimestatus = final.python3.pkgs.callPackage ./uptimestatus {};

View File

@ -0,0 +1,6 @@
{ pkgs, ... }:
pkgs.writeShellApplication {
name = "run-with-docker-group";
text = builtins.readFile ./run-with-docker-group.sh;
}

View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -eq 0 ]]; then
set -- "${SHELL}"
fi
exec systemd-run \
"--property=User=$(id -un)" \
"--property=SupplementaryGroups=docker" \
"--pty" "--same-dir" "--wait" "--collect" "--service-type=exec" \
"--quiet" \
"$@"