Regenerated

This commit is contained in:
2026-04-29 11:54:26 +02:00
parent 5165e9b7df
commit 6c7cf81efe
5 changed files with 784 additions and 420 deletions
@@ -165,4 +165,5 @@ bind = , workspace, exec, ~/.config/scripts/set-workspace-wallpaper.sh
#########################
# System stuff
#########################
bind = $mainMod, U, exec, kitty --class update-term -e bash -lc "~/.config/scripts/update.sh; exec bash"
# bind = $mainMod, U, exec, kitty --class update-term -e bash -lc "~/.config/scripts/update.sh; exec bash"
bind = $mainMod, U, exec, qs -c updater
@@ -0,0 +1,88 @@
// --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
import Quickshell
ShellWindow {
id: root
width: 600
height: 380
visible: true
property int currentStep: 0
property int totalSteps: 4
property string status: "idle"
Column {
anchors.fill: parent
anchors.margins: 16
spacing: 10
Text {
text: "System Updater"
font.pixelSize: 20
}
ProgressBar {
from: 0
to: root.totalSteps
value: root.currentStep
width: parent.width
}
Text {
text: "Step " + root.currentStep + " / " + root.totalSteps
}
Rectangle {
width: parent.width
height: 180
ListView {
id: logView
anchors.fill: parent
model: logModel
}
ListModel {
id: logModel
}
}
Row {
spacing: 10
Button {
text: "Run update"
onClicked: updater.start()
}
Button {
text: "Close"
onClicked: root.visible = false
}
}
}
Process {
id: updater
command: ["bash", "/home/henrov/.config/scripts/update-engine.sh"]
onStdout: function(data) {
let line = data.trim()
logModel.append({ text: line })
if (line.startsWith("STEP:")) {
let parts = line.split(":")
root.currentStep = parseInt(parts[1])
}
if (line.startsWith("DONE")) {
root.status = "done"
}
if (line.startsWith("FAIL")) {
root.status = "error"
}
}
}
}
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
set -uo pipefail
emit() { echo "$1"; }
step() {
echo "STEP:$1:$2"
}
ok() {
echo "OK:$1"
}
fail() {
echo "FAIL:$1"
}
REPO="/home/$USER/Repos/nixos/Droidnix"
HOSTNAME="$(hostname)"
cd "$REPO" || exit 1
step 1 "Fixing ownership"
sudo chown -R "$USER":"wheel" "$REPO" || fail "ownership"
ok 1
step 2 "Updating flake"
nix flake update || fail "flake"
ok 2
step 3 "Rebuilding system"
sudo nixos-rebuild switch --flake ".#$HOSTNAME" || fail "rebuild"
hyprctl reload
ok 3
step 4 "Flatpak cleanup"
flatpak uninstall --unused -y
flatpak update --appstream -y
flatpak update -y || fail "flatpak"
ok 4
emit "DONE"