tangled
alpha
login
or
join now
dunkirk.sh
/
dots
3
fork
atom
Kieran's opinionated (and probably slightly dumb) nix config
3
fork
atom
overview
issues
pulls
pipelines
chore: perm raise when run without sudo
dunkirk.sh
2 months ago
c3c2bc68
6782df3f
verified
This commit was signed with the committer's
known signature
.
dunkirk.sh
SSH Key Fingerprint:
SHA256:DqcG0RXYExE26KiWo3VxJnsxswN1QNfTBvB+bdSpk80=
+2
-4
1 changed file
expand all
collapse all
unified
split
modules
nixos
services
restic
cli.nix
+2
-4
modules/nixos/services/restic/cli.nix
···
57
57
input() { ${pkgs.gum}/bin/gum input "$@"; }
58
58
spin() { ${pkgs.gum}/bin/gum spin "$@"; }
59
59
60
60
-
# Check for root
60
60
+
# Auto-elevate to root if needed
61
61
if [ "$(id -u)" -ne 0 ]; then
62
62
-
style --foreground 196 "Error: atelier-backup must be run as root"
63
63
-
echo "Try: sudo atelier-backup $*"
64
64
-
exit 1
62
62
+
exec sudo "$0" "$@"
65
63
fi
66
64
67
65
# Restic wrapper with secrets