Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions modules/desktop/guivm/boot-ui.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
'';
};

Expand Down
1 change: 1 addition & 0 deletions modules/microvm/sysvms/guivm-base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ in
};

power-manager = {
enable = globalConfig.services.power-manager.enable or false;
vm.enable = true;
gui.enable = true;
};
Expand Down
7 changes: 5 additions & 2 deletions modules/reference/profiles/mvp-user-trial.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};
};
}
4 changes: 4 additions & 0 deletions targets/laptop/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -576,6 +579,7 @@ let
];
};
})
# keep-sorted end
];

# Map all of the defined configurations to an installer image
Expand Down
Loading