From cf0b4d16cfd3a353617004e8e97747aeab4f9f54 Mon Sep 17 00:00:00 2001 From: Kajus Naujokaitis Date: Thu, 12 Feb 2026 15:15:32 +0200 Subject: [PATCH 1/3] fix(power): enable power-manager globally and in gui-vm Signed-off-by: Kajus Naujokaitis --- modules/microvm/sysvms/guivm-base.nix | 1 + modules/reference/profiles/mvp-user-trial.nix | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/microvm/sysvms/guivm-base.nix b/modules/microvm/sysvms/guivm-base.nix index 39ee28c4ae..249a09c4b1 100644 --- a/modules/microvm/sysvms/guivm-base.nix +++ b/modules/microvm/sysvms/guivm-base.nix @@ -235,6 +235,7 @@ in }; power-manager = { + enable = globalConfig.services.power-manager.enable or false; vm.enable = true; gui.enable = true; }; diff --git a/modules/reference/profiles/mvp-user-trial.nix b/modules/reference/profiles/mvp-user-trial.nix index 1d94b87009..c7dd6dad45 100644 --- a/modules/reference/profiles/mvp-user-trial.nix +++ b/modules/reference/profiles/mvp-user-trial.nix @@ -189,8 +189,11 @@ in kill-switch.enable = true; }; - # Propagate performance enable to VMs via global-config - global-config.services.performance.enable = true; + # Propagate power and perf enable to VMs via global-config + global-config.services = { + power-manager.enable = true; + performance.enable = true; + }; }; }; } From 6340b631bcbda5f657490c896df04157995d183c Mon Sep 17 00:00:00 2001 From: Kajus Naujokaitis Date: Thu, 12 Feb 2026 15:16:11 +0200 Subject: [PATCH 2/3] fix(boot): revert wait-for-session implementation to previous Signed-off-by: Kajus Naujokaitis --- modules/desktop/guivm/boot-ui.nix | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/modules/desktop/guivm/boot-ui.nix b/modules/desktop/guivm/boot-ui.nix index 77d9461359..97aeacd5de 100644 --- a/modules/desktop/guivm/boot-ui.nix +++ b/modules/desktop/guivm/boot-ui.nix @@ -16,18 +16,30 @@ ... }: let - # Wait for ghaf-session to become active + # Wait for UID>=1000 session to become active with valid seat wait-for-session = pkgs.writeShellApplication { name = "wait-for-session"; runtimeInputs = [ pkgs.systemd - pkgs.coreutils + pkgs.jq ]; text = '' - # Loop until ghaf-session.target is active - while ! systemctl --user is-active ghaf-session.target > /dev/null 2>&1; do + echo "Waiting for user to login..." + USER_ID=1 + while [ "$USER_ID" -lt 1000 ]; do + tmp_id=$(loginctl list-sessions --json=short | jq -e '.[] | select(.seat != null) | .uid') || true + [[ "$tmp_id" =~ ^[0-9]+$ ]] && USER_ID="$tmp_id" || USER_ID=1 sleep 1 done + echo "User with ID=$USER_ID is now active" + + echo "Waiting for user-session to be running..." + state="inactive" + while [[ "$state" != "active" ]]; do + state=$(systemctl --user is-active session.slice --machine="$USER_ID"@.host) || true + sleep 1 + done + echo "User-session is active" ''; }; From 38e387bddad95c33170c2571604e6695b2a68edc Mon Sep 17 00:00:00 2001 From: Kajus Naujokaitis Date: Thu, 12 Feb 2026 15:16:59 +0200 Subject: [PATCH 3/3] cleanup: add automatic sorting for laptop targets Signed-off-by: Kajus Naujokaitis --- targets/laptop/flake-module.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/targets/laptop/flake-module.nix b/targets/laptop/flake-module.nix index 60313fa5aa..20e6941b6c 100644 --- a/targets/laptop/flake-module.nix +++ b/targets/laptop/flake-module.nix @@ -56,6 +56,7 @@ let # ============================================================ # Debug Configurations # ============================================================ + # keep-sorted start block=yes skip_lines=1 newline_separated=yes by_regex=\sname\s=\s\"(.*)\" (ghaf-configuration { name = "alienware-m18-R2"; @@ -339,10 +340,12 @@ let partitioning.disko.enable = true; }; }) + # keep-sorted end # ============================================================ # Release Configurations # ============================================================ + # keep-sorted start block=yes skip_lines=1 newline_separated=yes by_regex=\sname\s=\s\"(.*)\" (ghaf-configuration { name = "alienware-m18-R2"; @@ -576,6 +579,7 @@ let ]; }; }) + # keep-sorted end ]; # Map all of the defined configurations to an installer image