Commit 1fc2b6576189
tools/system/system
@@ -47,6 +47,18 @@ function switch() {
error "Failed to activate system"
}
+function boot() {
+ [ "$#" -eq 0 ] || error "switch"
+ build
+ local switch_bin="$WORK_DIR/bin/switch-to-configuration"
+ sudo nix-env --set \
+ --profile "/nix/var/nix/profiles/system" \
+ "$WORK_DIR" ||
+ error "Failed to activate profile"
+ sudo "$switch_bin" "boot" ||
+ error "Failed to activate system"
+}
+
function main() {
for target in $@; do
$target
Makefile
@@ -51,6 +51,10 @@ dry-build: secrets setup
switch: secrets
./bin/system switch
+.PHONY: boot
+boot: secrets
+ ./bin/system boot
+
.PHONY: install-hooks
install-hooks:
if [ -e .git ]; then nix-shell -p git --run 'git config core.hooksPath .githooks'; fi