diff --git a/Droidnix/README.html b/Droidnix/README.html index 11791fa2a..e8626b76f 100644 --- a/Droidnix/README.html +++ b/Droidnix/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Droidnix: A Dendritic NixOS + Home Manager Configuration NixOS Configuration Structure @@ -204,143 +204,143 @@

Table of Contents

-
-

Shortcuts

-
+
+

Shortcuts

+

Introduction The Assets Folder @@ -356,25 +356,25 @@

Introduction   intro

-
-

What is Droidnix

-
+
+

What is Droidnix

+

Droidnix is a modular, declarative NixOS + Home Manager configuration system. with configurations managed via Emacs Org and Nix Flakes. The project is designed for reproducibility, maintainability, and cross-machine compatibility.

-
-

Installed components:

-
+
+

Installed components:

+
    -
  • Core
  • -
  • Hyprland
  • +
  • Core
  • +
  • Hyprland
-
-

Goals, project Structure, import hierarchy

-
+
+

Goals, project Structure, import hierarchy

+

This project uses a modular NixOS configuration with Hyprland support, designed for literate programming and cross-device reusability. The Droidnix repository is organized into two main parts: @@ -387,9 +387,9 @@ The Droidnix repository is organized into two main parts:

-
-

Root Level

-
+
+

Root Level

+
  • = is the entry point and imports:
      @@ -400,16 +400,16 @@ The Droidnix repository is organized into two main parts:
-
-

Generated Structure

-
+
+

Generated Structure

+

The generated/ directory contains all generated configurations, divided into three main groups: system, hyprland, and mangowc.

-
-

First Setup

-
+
+

First Setup

+
  1. Clone this repository.
  2. Run the setup script: ./setup_droid.
  3. @@ -430,9 +430,9 @@ The generated/ directory contains all generated configurations, div The .assets/ folder contains all static files, such as configs, scripts, and themes. These files are not generated and can be edited directly.

-
-

generated/assets/2_b_installed.conf

-
+
+

generated/assets/2_b_installed.conf

+

This is a list of additional apps to install

@@ -510,9 +510,9 @@ com.logseq.Logseq
-
-

generated/assets/aliases.conf

-
+
+

generated/assets/aliases.conf

+

This is a list of additional apps to install

@@ -554,9 +554,9 @@ keys=hyprctl binds This section contains the Org blocks for tangling Nix code into the generated folders.

-
-

generated/flake.nix

-
+
+

generated/flake.nix

+

The Nix flake definition for Droidnix.

@@ -645,9 +645,9 @@ The Nix flake definition for Droidnix.
-
-

generated/modules/traveldroid/system/colors.nix

-
+
+

generated/modules/traveldroid/system/colors.nix

+

Setting the colors for Droidnix.

@@ -724,9 +724,9 @@ in
-
-

generated/hosts/traveldroid/boot.nix

-
+
+

generated/hosts/traveldroid/boot.nix

+
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
 { config, pkgs, lib, flakeRoot, ... }:
@@ -795,9 +795,9 @@ in
 
-
-

generated/hosts/traveldroid/hardware-configuration.nix

-
+
+

generated/hosts/traveldroid/hardware-configuration.nix

+
  1. Boot into NixOS Live ISO or your installed system.
  2. Open a terminal.
  3. @@ -855,9 +855,9 @@ in
-
-

generated/hosts/traveldroid/host.nix

-
+
+

generated/hosts/traveldroid/host.nix

+
{ lib, config, pkgs, flakeRoot, import-tree, home-manager, ... }:
 
@@ -917,13 +917,13 @@ in
 
-
-

generated/traveldroid/modules/apps

-
+
+

generated/traveldroid/modules/apps

+
-
-

generated/modules/traveldroid/apps/2_b_installed.nix

-
+
+

generated/modules/traveldroid/apps/2_b_installed.nix

+

This installs a list of apps

@@ -1031,9 +1031,9 @@ in {
-
-

generated/modules/traveldroid/apps/emacs/emacs.nix

-
+
+

generated/modules/traveldroid/apps/emacs/emacs.nix

+

This installs emacs

@@ -1129,9 +1129,9 @@ in
-
-

generated/disabled/modules/traveldroid/apps/flameshot.nix

-
+
+

generated/disabled/modules/traveldroid/apps/flameshot.nix

+

This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

@@ -1191,9 +1191,9 @@ in
-
-

generated/modules/traveldroid/apps/kdeconnect.nix

-
+
+

generated/modules/traveldroid/apps/kdeconnect.nix

+

This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

@@ -1222,9 +1222,9 @@ in
-
-

generated/modules/traveldroid/apps/kitty.nix

-
+
+

generated/modules/traveldroid/apps/kitty.nix

+

This file sets up Kitty terminal

@@ -1276,9 +1276,9 @@ in
-
-

generated/modules/traveldroid/apps/starship.nix

-
+
+

generated/modules/traveldroid/apps/starship.nix

+

This file sets up starship prompt

@@ -1317,9 +1317,9 @@ in
-
-

generated/modules/traveldroid/apps/thunar.nix

-
+
+

generated/modules/traveldroid/apps/thunar.nix

+

This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

@@ -1365,9 +1365,9 @@ in
-
-

generated/modules/traveldroid/apps/wofi.nix

-
+
+

generated/modules/traveldroid/apps/wofi.nix

+

This is the install for Wofi, the launcher

@@ -1402,9 +1402,9 @@ in
-
-

generated/modules/traveldroid/apps/zenbrowser.nix

-
+
+

generated/modules/traveldroid/apps/zenbrowser.nix

+

This installs zen browser

@@ -1424,9 +1424,9 @@ in
-
-

generated/modules/traveldroid/apps/zeditor.nix

-
+
+

generated/modules/traveldroid/apps/zeditor.nix

+

This sets Zed Editor

@@ -1482,9 +1482,9 @@ in
-
-

generated/modules/traveldroid/apps/zsh.nix

-
+
+

generated/modules/traveldroid/apps/zsh.nix

+

This sets up the zsh in the terminal

@@ -1598,13 +1598,13 @@ in
-
-

generated/modules/traveldroid/desktop

-
+
+

generated/modules/traveldroid/desktop

+
-
-

generated/modules/traveldroid/desktop/fonts.nix

-
+
+

generated/modules/traveldroid/desktop/fonts.nix

+

This file installs and configures fonts

@@ -1622,9 +1622,9 @@ This file installs and configures fonts
-
-

generated/modules/traveldroid/desktop/gtk.nix

-
+
+

generated/modules/traveldroid/desktop/gtk.nix

+

Setting up GTK

@@ -1650,9 +1650,9 @@ in
-
-

generated/modules/traveldroid/desktop/hyprland.nix

-
+
+

generated/modules/traveldroid/desktop/hyprland.nix

+

Setting up Hyprland

@@ -1697,9 +1697,9 @@ in
-
-

generated/modules/traveldroid/desktop/stylix.nix

-
+
+

generated/modules/traveldroid/desktop/stylix.nix

+
{ lib, config, pkgs, flakeRoot, stylix, ... }:
 
@@ -1786,9 +1786,9 @@ in
 
-
-

generated/modules/traveldroid/desktop/wallpaper.nix

-
+
+

generated/modules/traveldroid/desktop/wallpaper.nix

+

Setting up wallpaper engine + wallpaper gui

@@ -1887,9 +1887,9 @@ in
-
-

generated/modules/traveldroid/desktop/waybar.nix

-
+
+

generated/modules/traveldroid/desktop/waybar.nix

+

This file installs and configures waybar

@@ -1935,9 +1935,9 @@ in
-
-

generated/modules/traveldroid/desktop/wayland.nix

-
+
+

generated/modules/traveldroid/desktop/wayland.nix

+
{ lib, config, pkgs, ... }:
 
@@ -1967,9 +1967,9 @@ in
 
-
-

generated/modules/traveldroid/desktop/xdg.nix

-
+
+

generated/modules/traveldroid/desktop/xdg.nix

+

This sets the XDG implementation

@@ -2040,13 +2040,13 @@ in
-
-

generated/modules/traveldroid/system

-
+
+

generated/modules/traveldroid/system

+
-
-

generated/modules/traveldroid/system/audio.nix

-
+
+

generated/modules/traveldroid/system/audio.nix

+
{ lib, config, pkgs, ... }:
 
@@ -2065,9 +2065,9 @@ in
 
-
-

generated/modules/traveldroid/system/avahi.nix

-
+
+

generated/modules/traveldroid/system/avahi.nix

+

Avahi helps discovering services

@@ -2087,9 +2087,9 @@ Avahi helps discovering services
-
-

generated/modules/traveldroid/system/bluetooth.nix

-
+
+

generated/modules/traveldroid/system/bluetooth.nix

+

Installing Bluetooth services and supporting aps

@@ -2116,9 +2116,9 @@ in
-
-

generated/modules/traveldroid/system/copy_scripts.nix

-
+
+

generated/modules/traveldroid/system/copy_scripts.nix

+

This copies any scripts from generated.config/scripts to ~/.config/scripts and makes any .sh files executable.

@@ -2159,9 +2159,9 @@ in
-
-

generated/modules/traveldroid/system/dbus.nix

-
+
+

generated/modules/traveldroid/system/dbus.nix

+

This sets the dbus implementation

@@ -2188,9 +2188,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/firewall.nix

-
+
+

generated/modules/traveldroid/system/firewall.nix

+

This sets the firewall.

@@ -2271,9 +2271,9 @@ This sets the firewall.
-
-

generated/modules/traveldroid/system/hypridle.nix

-
+
+

generated/modules/traveldroid/system/hypridle.nix

+

This installs hypridle

@@ -2329,9 +2329,9 @@ in
-
-

generated/modules/traveldroid/system/hyprlock.nix

-
+
+

generated/modules/traveldroid/system/hyprlock.nix

+

This installs hyprlock

@@ -2388,9 +2388,9 @@ in
-
-

generated/modules/traveldroid/system/gnome-keyring.nix

-
+
+

generated/modules/traveldroid/system/gnome-keyring.nix

+

This sets the dbus implementation

@@ -2438,9 +2438,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/login-tuigreet.nix

-
+
+

generated/modules/traveldroid/system/login-tuigreet.nix

+

This sets up tuigreeter which is not fancy but imho fits the aesthetic I am aiming for

@@ -2487,9 +2487,9 @@ in
-
-

generated/modules/traveldroid/system/networking.nix

-
+
+

generated/modules/traveldroid/system/networking.nix

+

This sets the networking.

@@ -2538,9 +2538,9 @@ This sets the networking.
-
-

generated/modules/traveldroid/system/nix.nix

-
+
+

generated/modules/traveldroid/system/nix.nix

+
{ lib, config, ... }:
 {
@@ -2563,9 +2563,9 @@ This sets the networking.
 
-
-

generated/modules/traveldroid/system/printing.nix

-
+
+

generated/modules/traveldroid/system/printing.nix

+

This sets the dbus implementation

@@ -2589,9 +2589,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/quickshell.nix

-
+
+

generated/modules/traveldroid/system/quickshell.nix

+

This sets the dbus implementation

@@ -2643,9 +2643,9 @@ in
-
-

generated/modules/traveldroid/system/swaync.nix

-
+
+

generated/modules/traveldroid/system/swaync.nix

+

This sets the dbus implementation

@@ -2694,13 +2694,13 @@ in
-
-

generated/users

-
+
+

generated/users

+
-
-

generated/users/

-
+
+

generated/users/

+

This is the default user, just search and replace henrov another name if you want to change

@@ -2762,9 +2762,9 @@ in

These are all the prepared config files

-
-

generated/.config/emacs/early-init.el

-
+
+

generated/.config/emacs/early-init.el

+

This contaions emacs

@@ -2865,9 +2865,9 @@ package-archive-priorities '(("gnu" . 99)
-
-

generated/.config/emacs/init.el

-
+
+

generated/.config/emacs/init.el

+

This contaions emacs

@@ -3277,9 +3277,9 @@ the top of the file."
-
-

generated/.config/hypr/animations.conf

-
+
+

generated/.config/hypr/animations.conf

+

These are config files for .config/hypr

@@ -3298,9 +3298,9 @@ These are config files for .config/hypr
-
-

generated/.config/hypr/behaviour.conf

-
+
+

generated/.config/hypr/behaviour.conf

+

These are config files for .config/hypr

@@ -3322,9 +3322,9 @@ input {
-
-

generated/.config/hypr/bindings.conf

-
+
+

generated/.config/hypr/bindings.conf

+

These are config files for .config/hypr

@@ -3501,9 +3501,9 @@ bind = $mainMod, U, exec, qs -c updater
-
-

generated/.config/hypr/exec-once.conf

-
+
+

generated/.config/hypr/exec-once.conf

+

These are config files for .config/hypr

@@ -3524,9 +3524,9 @@ exec-once = waybar
-
-

generated/.config/hypr/hypridle.conf

-
+
+

generated/.config/hypr/hypridle.conf

+

These are config files for .config/hypr

@@ -3557,9 +3557,9 @@ listener {
-
-

generated/.config/hypr/hyprlock.conf

-
+
+

generated/.config/hypr/hyprlock.conf

+

These are config files for .config/hypr

@@ -3589,9 +3589,9 @@ input-field {
-
-

generated/.config/hypr/hyprland.conf

-
+
+

generated/.config/hypr/hyprland.conf

+

These are config files for .config/hypr

@@ -3610,9 +3610,9 @@ source = ./workspace-rules.conf
-
-

generated/.config/hypr/layer-rules.conf

-
+
+

generated/.config/hypr/layer-rules.conf

+

These are config files for .config/hypr

@@ -3625,9 +3625,9 @@ layerrule = xray 1, match:namespace swaync-control-center
-
-

generated/.config/hypr/layout.conf

-
+
+

generated/.config/hypr/layout.conf

+

These settings control Hyprland config

@@ -3642,9 +3642,9 @@ scrolling {
-
-

generated/.config/hypr/monitor-rules.conf

-
+
+

generated/.config/hypr/monitor-rules.conf

+

These are config files for .config/hypr

@@ -3655,9 +3655,9 @@ monitor = eDP-1, preferred, auto-left, 1.5
-
-

generated/.config/hypr/theming.conf

-
+
+

generated/.config/hypr/theming.conf

+

These are config files for .config/hypr

@@ -3723,9 +3723,9 @@ misc {
-
-

generated/.config/hypr/window-rules.conf

-
+
+

generated/.config/hypr/window-rules.conf

+

These are config files for .config/hypr

@@ -3816,9 +3816,9 @@ windowrule {
-
-

generated/.config/hypr/workspace-rules.conf

-
+
+

generated/.config/hypr/workspace-rules.conf

+

These setttings configure rules for workspaces

@@ -3833,9 +3833,9 @@ workspace = 6, monitor:DP-1 #, layout:dwindle
-
-

generated/.config/quickshell/media/shell.qml

-
+
+

generated/.config/quickshell/media/shell.qml

+

offers a audio widget

@@ -4229,9 +4229,9 @@ ShellRoot {
-
-

generated/.config/quickshell/powermenu/shell.qml

-
+
+

generated/.config/quickshell/powermenu/shell.qml

+

Provides a powermenu

@@ -4379,99 +4379,60 @@ ShellRoot {
-
-

generated/.config/quickshell/updater/shell.qml

-
+
+

generated/.config/quickshell/updater/shell.qml

+

Updates the system

-
import Quickshell
-import Quickshell.Io
-import QtQuick
-import QtQuick.Layouts
+
import QtQuick
 import QtQuick.Controls
 
 Window {
-    id: root
-    width: 600
-    height: 380
+    width: 500
+    height: 200
     visible: true
+    title: "System Updater"
 
-    property int currentStep: 0
-    property int totalSteps: 4
-    property string status: "idle"
+    property int progress: 0
+    property string status: "Waiting..."
 
-    Column {
-        anchors.fill: parent
-        anchors.margins: 16
-        spacing: 10
+    Timer {
+        interval: 300
+        running: true
+        repeat: true
 
-        Text {
-            text: "System Updater"
-            font.pixelSize: 20
-        }
+        onTriggered: {
+            let file = "/tmp/nixos-updater-status"
 
-        ProgressBar {
-            from: 0
-            to: root.totalSteps
-            value: root.currentStep
-            width: parent.width
-        }
+            let xhr = new XMLHttpRequest()
+            xhr.open("GET", "file://" + file)
+            xhr.onreadystatechange = function() {
+                if (xhr.readyState === XMLHttpRequest.DONE) {
+                    let parts = xhr.responseText.trim().split("|")
 
-        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
+                    if (parts.length === 2) {
+                        progress = parseInt(parts[0])
+                        status = parts[1]
+                    }
+                }
             }
+            xhr.send()
         }
     }
 
-    Process {
-        id: updater
-        command: ["bash", "/home/henrov/.config/scripts/update-engine.sh"]
+    Column {
+        anchors.centerIn: parent
+        spacing: 10
 
-        onOutput: function(data) {
-            logModel.append({ text: data.trim() })
+        Text { text: status }
 
-            if (data.startsWith("STEP:")) {
-                let parts = data.split(":")
-                root.currentStep = parseInt(parts[1])
-            }
-
-            if (data.startsWith("DONE")) {
-                root.status = "done"
-            }
-
-            if (data.startsWith("FAIL")) {
-                root.status = "error"
-            }
+        ProgressBar {
+            from: 0
+            to: 100
+            value: progress
+            width: 300
         }
     }
 }
@@ -4479,9 +4440,9 @@ Window {
 
-
-

generated/.config/quickshell/layoutswitcher/shell.qml

-
+
+

generated/.config/quickshell/layoutswitcher/shell.qml

+

Provides a layout menu

@@ -4628,9 +4589,9 @@ ShellRoot {
-
-

generated/.config/waybar/scripts/batterywarn.sh

-
+
+

generated/.config/waybar/scripts/batterywarn.sh

+

Providing an media

@@ -4647,9 +4608,9 @@ fi
-
-

generated/.config/waybar/scripts/media.sh

-
+
+

generated/.config/waybar/scripts/media.sh

+

Providing an media

@@ -4748,9 +4709,9 @@ jq -c -n \
-
-

generated/.config/scripts/numlock-check.sh

-
+
+

generated/.config/scripts/numlock-check.sh

+

Count keyboards and enable numlock if more then 1, else disable

@@ -4772,9 +4733,9 @@ fi
-
-

generated/.config/scripts/power.sh

-
+
+

generated/.config/scripts/power.sh

+

Enables a terminal power menu

@@ -4829,60 +4790,42 @@ main
-
-

generated/.config/scripts/update-engine.sh

-
+
+

generated/.config/scripts/update-engine.sh

+

A file containing color variables

-
set -uo pipefail
+
+STATUS_FILE="/tmp/nixos-updater-status"
 
-emit() { echo "$1"; }
+echo "0|Starting" > "$STATUS_FILE"
 
-step() {
-  echo "STEP:$1:$2"
+update_step() {
+    echo "$1|$2" > "$STATUS_FILE"
 }
 
-ok() {
-  echo "OK:$1"
-}
+update_step 10 "Fixing ownership"
+sudo chown -R "$USER":"wheel" "$REPO"
 
-fail() {
-  echo "FAIL:$1"
-}
+update_step 30 "Updating flake"
+nix flake update
 
-REPO="/home/$USER/Repos/nixos/Droidnix"
-HOSTNAME="$(hostname)"
-cd "$REPO" || exit 1
+update_step 60 "Rebuilding system"
+sudo nixos-rebuild switch --flake ".#$HOSTNAME"
 
-step 1 "Fixing ownership"
-sudo chown -R "$USER":"wheel" "$REPO" || fail "ownership"
-ok 1
+update_step 90 "Updating Flatpaks"
+flatpak update -y
 
-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"
+update_step 100 "Done"
 
-
-

generated/.config/wofi/scripts/wofi-launcher.sh

-
+
+

generated/.config/wofi/scripts/wofi-launcher.sh

+

Providing an media

@@ -4897,9 +4840,9 @@ Providing an media
-
-

generated/.config/shared/colors.css

-
+
+

generated/.config/shared/colors.css

+

A file containing color variables

@@ -4940,9 +4883,9 @@ A file containing color variables
-
-

generated/.config/starship.toml

-
+
+

generated/.config/starship.toml

+

These are config files for Starship

@@ -5230,9 +5173,9 @@ crust = "#181926"
-
-

generated/.config/stylix/stylix.conf

-
+
+

generated/.config/stylix/stylix.conf

+

These are config files for .config/stylix

@@ -5269,9 +5212,9 @@ icons = {
-
-

generated/.config/stylix/palette.json

-
+
+

generated/.config/stylix/palette.json

+

These are config files for .config/stylix

@@ -5301,9 +5244,9 @@ These are config files for .config/stylix
-
-

generated/.config/stylix/palette.html

-
+
+

generated/.config/stylix/palette.html

+

These are config files for .config/stylix

@@ -5380,9 +5323,9 @@ These are config files for .config/stylix
-
-

generated/.config/swaync/config.json

-
+
+

generated/.config/swaync/config.json

+

These are config files for waybar

@@ -5443,9 +5386,9 @@ These are config files for waybar
-
-

generated/.config/swaync/style.css

-
+
+

generated/.config/swaync/style.css

+

These are config files for waybar

@@ -5638,9 +5581,9 @@ These are config files for waybar
-
-

generated/.config/waybar/config.jsonc

-
+
+

generated/.config/waybar/config.jsonc

+

These are config files for waybar

@@ -5977,9 +5920,9 @@ These are config files for waybar
-
-

generated/.config/waybar/style-dark.css

-
+
+

generated/.config/waybar/style-dark.css

+

This file contains all css for waybar

@@ -6239,9 +6182,9 @@ label#custom-windows:not(.active) {
-
-

generated/.config/waybar/scripts/bluetooth-status.sh

-
+
+

generated/.config/waybar/scripts/bluetooth-status.sh

+

These are config files for waybar

@@ -6266,9 +6209,9 @@ printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
-
-

generated/.config/waybar/scripts/hypr-workspaces.sh

-
+
+

generated/.config/waybar/scripts/hypr-workspaces.sh

+

These are config files for waybar

@@ -6310,9 +6253,9 @@ jq -c -n \
-
-

generated/.config/waybar/scripts/hypr-workspacesmenu.sh

-
+
+

generated/.config/waybar/scripts/hypr-workspacesmenu.sh

+

These are config files for waybar

@@ -6334,9 +6277,9 @@ hyprctl dispatch focuswindow address:"$addr"
-
-

generated/.config/waybar/scripts/kdeconnect-status.sh

-
+
+

generated/.config/waybar/scripts/kdeconnect-status.sh

+

These are config files for waybar

@@ -6360,9 +6303,9 @@ fi
-
-

generated/.config/waypaper/config.ini

-
+
+

generated/.config/waypaper/config.ini

+

These are config files for waypaper

@@ -6399,9 +6342,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

generated/.config/waypaper/config.ini

-
+
+

generated/.config/waypaper/config.ini

+

These are config files for .config/waypaper

@@ -6437,9 +6380,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

generated/.config/wofi/config

-
+
+

generated/.config/wofi/config

+

These are config files for .config/wofi

@@ -6466,9 +6409,9 @@ prompt = > ...
-
-

generated/.config/wofi/style.css

-
+
+

generated/.config/wofi/style.css

+

This is the default layout for wofi

@@ -6564,9 +6507,9 @@ This is the default layout for wofi
-
-

generated/.config/zed/settings.json

-
+
+

generated/.config/zed/settings.json

+

These are config files for Zed editor

@@ -6604,9 +6547,9 @@ These are config files for Zed editor
-
-

generated/.config/zsh/.zshrc

-
+
+

generated/.config/zsh/.zshrc

+

This sets up the zsh in the terminal

@@ -6643,7 +6586,7 @@ cd() {

Author: Henro Veijer

-

Created: 2026-04-29 wo 12:01

+

Created: 2026-04-29 wo 12:06

Validate

diff --git a/Droidnix/README.org b/Droidnix/README.org index d3c8221d7..d8c42582e 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -3670,92 +3670,53 @@ ShellRoot { ** =generated/.config/quickshell/updater/shell.qml= Updates the system #+BEGIN_SRC qml :tangle generated/.config/quickshell/updater/shell.qml :noweb yes :mkdirp yes :eval never -import Quickshell -import Quickshell.Io import QtQuick -import QtQuick.Layouts import QtQuick.Controls Window { - id: root - width: 600 - height: 380 + width: 500 + height: 200 visible: true + title: "System Updater" - property int currentStep: 0 - property int totalSteps: 4 - property string status: "idle" + property int progress: 0 + property string status: "Waiting..." - Column { - anchors.fill: parent - anchors.margins: 16 - spacing: 10 + Timer { + interval: 300 + running: true + repeat: true - Text { - text: "System Updater" - font.pixelSize: 20 - } + onTriggered: { + let file = "/tmp/nixos-updater-status" - ProgressBar { - from: 0 - to: root.totalSteps - value: root.currentStep - width: parent.width - } + let xhr = new XMLHttpRequest() + xhr.open("GET", "file://" + file) + xhr.onreadystatechange = function() { + if (xhr.readyState === XMLHttpRequest.DONE) { + let parts = xhr.responseText.trim().split("|") - 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 + if (parts.length === 2) { + progress = parseInt(parts[0]) + status = parts[1] + } + } } + xhr.send() } } - Process { - id: updater - command: ["bash", "/home/henrov/.config/scripts/update-engine.sh"] + Column { + anchors.centerIn: parent + spacing: 10 - onOutput: function(data) { - logModel.append({ text: data.trim() }) + Text { text: status } - if (data.startsWith("STEP:")) { - let parts = data.split(":") - root.currentStep = parseInt(parts[1]) - } - - if (data.startsWith("DONE")) { - root.status = "done" - } - - if (data.startsWith("FAIL")) { - root.status = "error" - } + ProgressBar { + from: 0 + to: 100 + value: progress + width: 300 } } } @@ -4084,46 +4045,28 @@ main ** =generated/.config/scripts/update-engine.sh= A file containing color variables #+BEGIN_SRC sh :tangle generated/.config/scripts/update-engine.sh :shebang "#!/usr/bin/env bash" :noweb yes :mkdirp yes :eval never -set -uo pipefail -emit() { echo "$1"; } +STATUS_FILE="/tmp/nixos-updater-status" -step() { - echo "STEP:$1:$2" +echo "0|Starting" > "$STATUS_FILE" + +update_step() { + echo "$1|$2" > "$STATUS_FILE" } -ok() { - echo "OK:$1" -} +update_step 10 "Fixing ownership" +sudo chown -R "$USER":"wheel" "$REPO" -fail() { - echo "FAIL:$1" -} +update_step 30 "Updating flake" +nix flake update -REPO="/home/$USER/Repos/nixos/Droidnix" -HOSTNAME="$(hostname)" -cd "$REPO" || exit 1 +update_step 60 "Rebuilding system" +sudo nixos-rebuild switch --flake ".#$HOSTNAME" -step 1 "Fixing ownership" -sudo chown -R "$USER":"wheel" "$REPO" || fail "ownership" -ok 1 +update_step 90 "Updating Flatpaks" +flatpak update -y -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" +update_step 100 "Done" #+END_SRC ** =generated/.config/wofi/scripts/wofi-launcher.sh= diff --git a/Droidnix/generated/.config/quickshell/updater/shell.qml b/Droidnix/generated/.config/quickshell/updater/shell.qml index bed9b0c81..659c00250 100644 --- a/Droidnix/generated/.config/quickshell/updater/shell.qml +++ b/Droidnix/generated/.config/quickshell/updater/shell.qml @@ -1,90 +1,51 @@ // --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. --- -import Quickshell -import Quickshell.Io import QtQuick -import QtQuick.Layouts import QtQuick.Controls Window { - id: root - width: 600 - height: 380 + width: 500 + height: 200 visible: true + title: "System Updater" - property int currentStep: 0 - property int totalSteps: 4 - property string status: "idle" + property int progress: 0 + property string status: "Waiting..." + + Timer { + interval: 300 + running: true + repeat: true + + onTriggered: { + let file = "/tmp/nixos-updater-status" + + let xhr = new XMLHttpRequest() + xhr.open("GET", "file://" + file) + xhr.onreadystatechange = function() { + if (xhr.readyState === XMLHttpRequest.DONE) { + let parts = xhr.responseText.trim().split("|") + + if (parts.length === 2) { + progress = parseInt(parts[0]) + status = parts[1] + } + } + } + xhr.send() + } + } Column { - anchors.fill: parent - anchors.margins: 16 + anchors.centerIn: parent spacing: 10 - Text { - text: "System Updater" - font.pixelSize: 20 - } + Text { text: status } 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"] - - onOutput: function(data) { - logModel.append({ text: data.trim() }) - - if (data.startsWith("STEP:")) { - let parts = data.split(":") - root.currentStep = parseInt(parts[1]) - } - - if (data.startsWith("DONE")) { - root.status = "done" - } - - if (data.startsWith("FAIL")) { - root.status = "error" - } + to: 100 + value: progress + width: 300 } } } diff --git a/Droidnix/generated/.config/scripts/update-engine.sh b/Droidnix/generated/.config/scripts/update-engine.sh index 6df7d32ec..c4a377b1e 100755 --- a/Droidnix/generated/.config/scripts/update-engine.sh +++ b/Droidnix/generated/.config/scripts/update-engine.sh @@ -1,42 +1,24 @@ #!/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"; } +STATUS_FILE="/tmp/nixos-updater-status" -step() { - echo "STEP:$1:$2" +echo "0|Starting" > "$STATUS_FILE" + +update_step() { + echo "$1|$2" > "$STATUS_FILE" } -ok() { - echo "OK:$1" -} +update_step 10 "Fixing ownership" +sudo chown -R "$USER":"wheel" "$REPO" -fail() { - echo "FAIL:$1" -} +update_step 30 "Updating flake" +nix flake update -REPO="/home/$USER/Repos/nixos/Droidnix" -HOSTNAME="$(hostname)" -cd "$REPO" || exit 1 +update_step 60 "Rebuilding system" +sudo nixos-rebuild switch --flake ".#$HOSTNAME" -step 1 "Fixing ownership" -sudo chown -R "$USER":"wheel" "$REPO" || fail "ownership" -ok 1 +update_step 90 "Updating Flatpaks" +flatpak update -y -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" +update_step 100 "Done"