aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-11-25 18:10:34 -0300
committerEuAndreh <eu@euandre.org>2022-11-25 18:11:09 -0300
commite433f6def0c36055a43220cbd4b647acd7a786e2 (patch)
tree497880e8f1c58aea8e5cc99091ba3c0cfd2f1f45
parentSetup toph access to suyin for making backups (diff)
downloadtoph-e433f6def0c36055a43220cbd4b647acd7a786e2.tar.gz
toph-e433f6def0c36055a43220cbd4b647acd7a786e2.tar.xz
src/infrastructure/guix/system.scm: Move suyin and SSH configuration to root account
Remove auxiliary "borg" group used to give read permission to the passphrase file.
-rw-r--r--src/infrastructure/guix/system.scm17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/infrastructure/guix/system.scm b/src/infrastructure/guix/system.scm
index a6093a9..516e027 100644
--- a/src/infrastructure/guix/system.scm
+++ b/src/infrastructure/guix/system.scm
@@ -207,12 +207,10 @@
ARCHIVE_TAG="${1:-manual}"
- export BORG_RSH="ssh -i $HOME/.ssh/id_rsa"
-
run() {
set -x
# shellcheck disable=2086
- sudo -E borg create \
+ sudo -i borg create \
$VERBOSE_FLAGS \
--comment " $COMMENT" \
--stats \
@@ -236,8 +234,9 @@
fi
}
- run
- exit $?
+ run || exit $?
+
+ sudo -i borg check --verify-data --verbose
"#)
(define cronjob.sh #"-
@@ -393,11 +392,11 @@
shift $((OPTIND - 1))
if [ "$UPDATE" = true ]; then
- guix pull -v3
+ sudo -i guix pull -v3
fi
- sudo -E guix system -v3 reconfigure /etc/guix/system.scm
+ sudo -i guix system -v3 reconfigure /etc/guix/system.scm
"#)
(define with-email.sh #"-
@@ -1669,7 +1668,7 @@
(name whoami)
(comment "EuAndreh")
(group "users")
- (supplementary-groups '("wheel" "borg")))
+ (supplementary-groups '("wheel")))
(user-account
(name "git")
(group "git")
@@ -1682,8 +1681,6 @@
(append
(list
(user-group
- (name "borg"))
- (user-group
(name "git")))
%base-groups))
(sudoers-file