File tree Expand file tree Collapse file tree 6 files changed +27
-19
lines changed
Expand file tree Collapse file tree 6 files changed +27
-19
lines changed Original file line number Diff line number Diff 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)
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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} :
1717let
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 } " ;
Original file line number Diff line number Diff line change 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} :
1818let
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 ;
2122in
2223{
2324 _file = ./shared-folders.nix ;
Original file line number Diff line number Diff line change 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 ,
1515} :
1616let
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 " ;
2020in
2121{
2222 _file = ./shared-mem.nix ;
Original file line number Diff line number Diff line change 210210 "high"
211211 ] ;
212212 description = "Boot priority for the VM (affects systemd ordering)" ;
213- default = "low " ;
213+ default = "medium " ;
214214 } ;
215215 } ;
216216 }
You can’t perform that action at this time.
0 commit comments