aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/reconfigure18
-rw-r--r--etc/guix/home.scm2
2 files changed, 17 insertions, 3 deletions
diff --git a/bin/reconfigure b/bin/reconfigure
index af94f48..72eb0c7 100755
--- a/bin/reconfigure
+++ b/bin/reconfigure
@@ -4,7 +4,7 @@ set -eu
usage() {
cat <<-'EOF'
Usage:
- reconfigure
+ reconfigure [-U]
reconfigure -h
EOF
}
@@ -13,6 +13,7 @@ help() {
cat <<-'EOF'
Options:
+ -U run update(1) before acting
-h, --help show this message
@@ -27,6 +28,11 @@ help() {
Just use it:
$ reconfigure
+
+
+ Update before reconfiguring:
+
+ $ reconfigure -U
EOF
}
@@ -46,8 +52,12 @@ for flag in "$@"; do
esac
done
-while getopts 'h' flag; do
+UPDATE=false
+while getopts 'Uh' flag; do
case "$flag" in
+ U)
+ UPDATE=true
+ ;;
h)
usage
help
@@ -68,6 +78,10 @@ if [ "$(id -un)" = 'root' ]; then
exit 2
fi
+if [ "$UPDATE" = true ]; then
+ update
+fi
+
HOSTNAME="$(hostname)"
diff --git a/etc/guix/home.scm b/etc/guix/home.scm
index 24e8616..6c7812b 100644
--- a/etc/guix/home.scm
+++ b/etc/guix/home.scm
@@ -289,7 +289,7 @@ left it off the last time it was used.")
(define cronjobs
(list
#~(job "0 0 * * *" "cronjob check")
- #~(job "30 4 * * *" "cronjob x update AND reconfigure")
+ #~(job "30 4 * * *" "cronjob reconfigure -U")
#~(job "30 1 * * *" "cronjob backup -q cron")))
(define (home-service name package bin)