Skip to content

Commit bcd38e5

Browse files
last alignment fixes
Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
1 parent 7f47758 commit bcd38e5

File tree

6 files changed

+27
-19
lines changed

6 files changed

+27
-19
lines changed

lib/global-config.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ rec {
172172
default = "";
173173
description = "Shared memory server socket path";
174174
};
175+
176+
flataddr = mkOption {
177+
type = types.str;
178+
default = "0x920000000";
179+
description = "Maps the shared memory to a physical address for kvm_ivshmem";
180+
};
175181
};
176182

177183
# Graphics/boot UI settings
@@ -672,9 +678,10 @@ rec {
672678
# User configuration (complex, kept as-is for now)
673679
users = config.ghaf.users or { };
674680

675-
# Reference services (profile-specific)
681+
# Reference config (profile-specific)
676682
reference = {
677683
services = config.ghaf.reference.services or { };
684+
desktop = config.ghaf.reference.desktop or { };
678685
};
679686

680687
# Networking info (IP addresses, CIDs, etc. for this VM and others)

modules/desktop/guivm/default.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
# }
1616
#
1717
# Feature modules auto-include based on:
18-
# - boot-ui.nix: ghaf.graphics.boot.enable
19-
# - shared-folders.nix: ghaf.storagevm.shared-folders.enable
20-
# - shared-mem.nix: ghaf.virtualization.microvm.sharedMem.enable
21-
# - ghaf-intro.nix: ghaf.reference.services.ghaf-intro.enable
18+
# - boot-ui.nix: globalConfig.graphics.boot.enable
19+
# - shared-folders.nix: config.ghaf.storagevm.shared-folders.enable (VM-local)
20+
# - shared-mem.nix: globalConfig.shm.enable
21+
# - ghaf-intro.nix: hostConfig.reference.desktop.ghaf-intro.enable
2222
#
2323
# Note: Waypipe configuration is not included here as it requires host-level
2424
# access to microvm.vms for iterating over AppVMs. It's contributed via

modules/desktop/guivm/ghaf-intro.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@
66
# This module configures the first-boot Ghaf introduction autostart service.
77
# It watches for COSMIC initial setup completion and launches the intro app.
88
#
9-
# This module is auto-included when ghaf.reference.services.ghaf-intro.enable is true.
9+
# This module is auto-included when ghaf-intro is enabled in the reference desktop config.
1010
#
1111
{
1212
lib,
1313
pkgs,
14-
globalConfig,
14+
hostConfig,
1515
...
1616
}:
1717
let
18-
# Only enable if ghaf-intro service is enabled in globalConfig
19-
ghafIntroEnabled = globalConfig.reference.services.ghaf-intro.enable or false;
18+
# Only enable if ghaf-intro is enabled in the host's reference desktop config
19+
ghafIntroEnabled = hostConfig.reference.desktop.ghaf-intro.enable or false;
2020

21-
# Get the intro command from reference services config
21+
# Launch ghaf-intro in chrome-vm via givc-cli (it's a Chrome-based app)
2222
introCommand =
2323
let
2424
wrapper = pkgs.writeShellScriptBin "ghaf-intro-autostart" ''
25-
${pkgs.ghaf-intro}/bin/ghaf-intro
25+
${pkgs.givc-cli}/bin/givc-cli ${hostConfig.givc.cliArgs or ""} start app --vm chrome-vm ghaf-intro
2626
'';
2727
in
2828
"${lib.getExe wrapper}";

modules/desktop/guivm/shared-folders.nix

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@
77
# change notifications. This allows the file manager to automatically
88
# refresh when files change in shared folders.
99
#
10-
# This module is auto-included when ghaf.storagevm.shared-folders.enable is true.
10+
# This module is auto-included when config.ghaf.storagevm.shared-folders.enable is true.
1111
#
1212
{
13+
config,
1314
lib,
1415
pkgs,
15-
globalConfig,
1616
...
1717
}:
1818
let
19-
# Only enable if shared folders are enabled in globalConfig
20-
sharedFoldersEnabled = globalConfig.storagevm.shared-folders.enable or false;
19+
# Only enable if shared folders are enabled in the VM's own config
20+
# (set by guivm-base.nix: ghaf.storagevm.shared-folders.enable = true)
21+
sharedFoldersEnabled = config.ghaf.storagevm.shared-folders.enable or false;
2122
in
2223
{
2324
_file = ./shared-folders.nix;

modules/desktop/guivm/shared-mem.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# This module configures kernel parameters for kvm_ivshmem shared memory
77
# communication between VMs.
88
#
9-
# This module is auto-included when ghaf.virtualization.microvm.sharedMem.enable is true.
9+
# This module is auto-included when globalConfig.shm.enable is true.
1010
#
1111
{
1212
lib,
@@ -15,8 +15,8 @@
1515
}:
1616
let
1717
# Only enable if shared memory is enabled in globalConfig
18-
sharedMemEnabled = globalConfig.virtualization.microvm.sharedMem.enable or false;
19-
flataddr = globalConfig.virtualization.microvm.sharedMem.flataddr or "0x220000000";
18+
sharedMemEnabled = globalConfig.shm.enable or false;
19+
flataddr = globalConfig.shm.flataddr or "0x920000000";
2020
in
2121
{
2222
_file = ./shared-mem.nix;

modules/microvm/appvm.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ in
210210
"high"
211211
];
212212
description = "Boot priority for the VM (affects systemd ordering)";
213-
default = "low";
213+
default = "medium";
214214
};
215215
};
216216
}

0 commit comments

Comments
 (0)