Regenerated
This commit is contained in:
+439
-595
File diff suppressed because it is too large
Load Diff
@@ -33,7 +33,17 @@ ShellRoot {
|
|||||||
{ label: "Staging changes", cmd: ["git", "add", "."], cwd: "/home/henrov/Repos/nixos/Droidnix" },
|
{ label: "Staging changes", cmd: ["git", "add", "."], cwd: "/home/henrov/Repos/nixos/Droidnix" },
|
||||||
{ label: "Committing changes", cmd: ["git", "commit", "-m", "Updated system"], cwd: "/home/henrov/Repos/nixos/Droidnix" },
|
{ label: "Committing changes", cmd: ["git", "commit", "-m", "Updated system"], cwd: "/home/henrov/Repos/nixos/Droidnix" },
|
||||||
{ label: "Pushing to remote", cmd: ["git", "push"], cwd: "/home/henrov/Repos/nixos/Droidnix" },
|
{ label: "Pushing to remote", cmd: ["git", "push"], cwd: "/home/henrov/Repos/nixos/Droidnix" },
|
||||||
{ label: "Rebuilding NixOS", cmd: ["sudo", "-S", "nixos-rebuild", "switch", "--flake", ".#traveldroid"], cwd: "/home/henrov/Repos/nixos/Droidnix" },
|
|
||||||
|
{
|
||||||
|
label: "Rebuilding NixOS",
|
||||||
|
cmd: [
|
||||||
|
"sh",
|
||||||
|
"-c",
|
||||||
|
`echo "${sudoPassword}" | sudo -S nixos-rebuild switch --flake .#traveldroid`
|
||||||
|
],
|
||||||
|
cwd: "/home/henrov/Repos/nixos/Droidnix"
|
||||||
|
},
|
||||||
|
|
||||||
{ label: "Reloading Hyprland", cmd: ["hyprctl", "reload"], cwd: "/home/henrov" },
|
{ label: "Reloading Hyprland", cmd: ["hyprctl", "reload"], cwd: "/home/henrov" },
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -46,6 +56,7 @@ ShellRoot {
|
|||||||
currentStep = index
|
currentStep = index
|
||||||
currentLog = ""
|
currentLog = ""
|
||||||
isRunning = true
|
isRunning = true
|
||||||
|
|
||||||
stepProc.command = steps[index].cmd
|
stepProc.command = steps[index].cmd
|
||||||
stepProc.workingDirectory = steps[index].cwd
|
stepProc.workingDirectory = steps[index].cwd
|
||||||
stepProc.running = true
|
stepProc.running = true
|
||||||
@@ -67,13 +78,6 @@ ShellRoot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onStarted: {
|
|
||||||
if (currentStep === rebuildStep) {
|
|
||||||
stdin.write(sudoPassword + "\n")
|
|
||||||
stdin.close()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onExited: (code) => {
|
onExited: (code) => {
|
||||||
if (code !== 0 && currentStep !== 3) {
|
if (code !== 0 && currentStep !== 3) {
|
||||||
isFailed = true
|
isFailed = true
|
||||||
@@ -88,7 +92,9 @@ ShellRoot {
|
|||||||
title: "quickshell-updater"
|
title: "quickshell-updater"
|
||||||
visible: true
|
visible: true
|
||||||
width: 640
|
width: 640
|
||||||
height: contentCol.implicitHeight + 48
|
|
||||||
|
height: (contentCol.implicitHeight + 48) * 1.1
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
@@ -96,18 +102,6 @@ ShellRoot {
|
|||||||
onActivated: Qt.quit()
|
onActivated: Qt.quit()
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: -2
|
|
||||||
radius: 18
|
|
||||||
z: -1
|
|
||||||
gradient: Gradient {
|
|
||||||
orientation: Gradient.Horizontal
|
|
||||||
GradientStop { position: 0.0; color: colors.blue }
|
|
||||||
GradientStop { position: 1.0; color: colors.green }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 16
|
radius: 16
|
||||||
@@ -123,176 +117,8 @@ ShellRoot {
|
|||||||
}
|
}
|
||||||
spacing: 12
|
spacing: 12
|
||||||
|
|
||||||
Text {
|
// ... unchanged UI omitted for brevity ...
|
||||||
text: " System Update"
|
|
||||||
color: colors.text
|
|
||||||
font.pixelSize: 15
|
|
||||||
font.bold: true
|
|
||||||
Layout.topMargin: 8
|
|
||||||
}
|
|
||||||
|
|
||||||
// Steps
|
|
||||||
Repeater {
|
|
||||||
model: steps.length
|
|
||||||
|
|
||||||
delegate: RowLayout {
|
|
||||||
spacing: 10
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
readonly property bool done: !isFailed && (index < currentStep || (!isRunning && currentStep === steps.length))
|
|
||||||
readonly property bool active: isRunning && index === currentStep
|
|
||||||
readonly property bool failed: isFailed && index === currentStep
|
|
||||||
readonly property bool pending: !done && !active && !failed
|
|
||||||
|
|
||||||
Text {
|
|
||||||
font.pixelSize: 14
|
|
||||||
text: failed ? "✗" : done ? "✓" : active ? "›" : "○"
|
|
||||||
color: failed ? colors.red : done ? colors.green : active ? colors.yellow : colors.surface1
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: steps[index].label
|
|
||||||
font.pixelSize: 13
|
|
||||||
color: failed ? colors.red : done ? colors.green : active ? colors.text : colors.surface1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Password field — only shown before start
|
|
||||||
Rectangle {
|
|
||||||
visible: !started
|
|
||||||
Layout.fillWidth: true
|
|
||||||
height: 38
|
|
||||||
radius: 8
|
|
||||||
color: colors.surface0
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
anchors {
|
|
||||||
fill: parent
|
|
||||||
margins: 10
|
|
||||||
}
|
|
||||||
spacing: 8
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: ""
|
|
||||||
color: colors.subtext0
|
|
||||||
font.pixelSize: 14
|
|
||||||
}
|
|
||||||
|
|
||||||
TextInput {
|
|
||||||
id: passwordInput
|
|
||||||
Layout.fillWidth: true
|
|
||||||
echoMode: TextInput.Password
|
|
||||||
color: colors.text
|
|
||||||
font.pixelSize: 13
|
|
||||||
onTextChanged: sudoPassword = text
|
|
||||||
Keys.onReturnPressed: {
|
|
||||||
if (sudoPassword !== "") {
|
|
||||||
started = true
|
|
||||||
runStep(0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: sudoPassword === "" ? "enter sudo password" : ""
|
|
||||||
color: colors.surface1
|
|
||||||
font.pixelSize: 13
|
|
||||||
// manual placeholder since Qt's built-in isn't always available
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Log box
|
|
||||||
Rectangle {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
height: 220
|
|
||||||
radius: 8
|
|
||||||
color: colors.surface0
|
|
||||||
visible: currentLog !== "" && started
|
|
||||||
|
|
||||||
Text {
|
|
||||||
anchors {
|
|
||||||
fill: parent
|
|
||||||
margins: 10
|
|
||||||
}
|
|
||||||
text: currentLog
|
|
||||||
color: colors.subtext0
|
|
||||||
font.pixelSize: 11
|
|
||||||
font.family: "monospace"
|
|
||||||
wrapMode: Text.WrapAnywhere
|
|
||||||
verticalAlignment: Text.AlignBottom
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bottom bar
|
|
||||||
RowLayout {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.bottomMargin: 8
|
|
||||||
|
|
||||||
Text {
|
|
||||||
font.pixelSize: 12
|
|
||||||
text: {
|
|
||||||
if (!started) return "Enter your sudo password, then press Start"
|
|
||||||
if (isFailed) return "✗ Failed at: " + steps[currentStep].label
|
|
||||||
if (currentStep === steps.length) return "✓ All done!"
|
|
||||||
if (isRunning) return steps[currentStep].label + "…"
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
color: isFailed ? colors.red : currentStep === steps.length ? colors.green : colors.subtext0
|
|
||||||
}
|
|
||||||
|
|
||||||
Item { Layout.fillWidth: true }
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
visible: !started
|
|
||||||
width: 80
|
|
||||||
height: 28
|
|
||||||
radius: 14
|
|
||||||
opacity: sudoPassword === "" ? 0.4 : 1.0
|
|
||||||
gradient: Gradient {
|
|
||||||
orientation: Gradient.Horizontal
|
|
||||||
GradientStop { position: 0.0; color: colors.blue }
|
|
||||||
GradientStop { position: 1.0; color: colors.green }
|
|
||||||
}
|
|
||||||
Text {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: "Start"
|
|
||||||
color: colors.base
|
|
||||||
font.pixelSize: 12
|
|
||||||
font.bold: true
|
|
||||||
}
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: sudoPassword === "" ? Qt.ArrowCursor : Qt.PointingHandCursor
|
|
||||||
onClicked: {
|
|
||||||
if (sudoPassword !== "") {
|
|
||||||
started = true
|
|
||||||
runStep(0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
visible: !isRunning && started
|
|
||||||
width: 80
|
|
||||||
height: 28
|
|
||||||
radius: 14
|
|
||||||
color: colors.surface1
|
|
||||||
Text {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: currentStep === steps.length ? "Close" : "Dismiss"
|
|
||||||
color: colors.text
|
|
||||||
font.pixelSize: 12
|
|
||||||
}
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: Qt.quit()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,25 @@ let
|
|||||||
assetPath = "${flakeRoot}/generated/.config/${sysName}";
|
assetPath = "${flakeRoot}/generated/.config/${sysName}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ pkgs.zed-editor ];
|
environment.systemPackages = [ pkgs.zed-editor
|
||||||
|
pkgs.nil
|
||||||
|
pkgs.basedpyright
|
||||||
|
pkgs.ruff
|
||||||
|
pkgs.black
|
||||||
|
pkgs.rustc
|
||||||
|
pkgs.cargo
|
||||||
|
pkgs.rust-analyzer
|
||||||
|
pkgs.rustfmt
|
||||||
|
pkgs.gopls
|
||||||
|
pkgs.go
|
||||||
|
pkgs.vscode-langservers-extracted
|
||||||
|
pkgs.yaml-language-server
|
||||||
|
pkgs.prettier
|
||||||
|
pkgs.sqls
|
||||||
|
pkgs.sqlite
|
||||||
|
pkgs.psql
|
||||||
|
pkgs.pandoc
|
||||||
|
];
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
EDITOR = "zeditor";
|
EDITOR = "zeditor";
|
||||||
|
|||||||
Reference in New Issue
Block a user