summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/nix-daemon-update.sh
diff options
context:
space:
mode:
authorsommerfeld <sommerfeld@sommerfeld.dev>2026-09-17 15:05:36 +0100
committersommerfeld <sommerfeld@sommerfeld.dev>2026-09-17 15:05:36 +0100
commitaff435a0fb3a56b1d7b738c7dede363440884b3a (patch)
tree07acb41d37760aa169ee42dbeb69da3621cc7489 /scripts/nix-daemon-update.sh
parenta7f74c1fa4b89c5829f5896842eb7248c820704c (diff)
downloaddotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.tar.gz
dotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.tar.bz2
dotfiles-aff435a0fb3a56b1d7b738c7dede363440884b3a.zip
Add the Canonical laptop profile and setup workflows
Diffstat (limited to 'scripts/nix-daemon-update.sh')
-rw-r--r--scripts/nix-daemon-update.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/nix-daemon-update.sh b/scripts/nix-daemon-update.sh
new file mode 100644
index 0000000..2b2d12c
--- /dev/null
+++ b/scripts/nix-daemon-update.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+set -euo pipefail
+if [[ -e /nix/nix-installer || -e /etc/nix/nix.custom.conf ]] || dpkg-query -W nix-bin >/dev/null 2>&1; then
+ echo 'error: this recipe is only for the upstream multi-user installer' >&2
+ exit 1
+fi
+nix=/nix/var/nix/profiles/default/bin/nix
+[[ -x $nix ]]
+sudo "$nix" --extra-experimental-features nix-command upgrade-nix --profile /nix/var/nix/profiles/default
+sudo systemctl daemon-reload
+sudo systemctl restart nix-daemon.service
+"$nix" --version