Skip to content

Commit

Permalink
Rebase ghaf release 24.06
Browse files Browse the repository at this point in the history
- Update flake.lock to ghaf 24.06
- Modify config-processor to use ghaf modules
- Rename microvm interface id from "vm-*" to "tap-*"
- Simplify some configs due to updated nixpkgs
- Adapt app changes to new version: lisgd, squeekboard
- Remove upstream package overlay which caused error in previous build
- Remove local golang, go-app is now built with nixpkgs.buildGoModules
- Issue remained: fmo-dci warning and added unused (not working) audiovm

Signed-off-by: Anh Huy Bui <[email protected]>
  • Loading branch information
buianhhuy96 committed Jul 12, 2024
1 parent 3c112f1 commit 1539e3f
Show file tree
Hide file tree
Showing 38 changed files with 778 additions and 1,730 deletions.
15 changes: 11 additions & 4 deletions config-processor-hardware.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,24 @@ let
[
microvm.nixosModules.host
self.nixosModules.fmo-configs
self.nixosModules.ghaf-common
ghafOS.nixosModules.host

(import "${ghafOS}/modules/host")
(import "${ghafOS}/modules/virtualization/microvm/microvm-host.nix")
(import "${ghafOS}/modules/microvm/networking.nix")
(import "${ghafOS}/modules/microvm/virtualization/microvm/microvm-host.nix")

# WAR: ghaf mainline has audiovm hardcoded. This causes audiovm defined here
# This should be removed when audiovm on ghaf mainline is fixed.
# JIRA: FMO-43 for monitoring this issue."
(import "${ghafOS}/modules/microvm/virtualization/microvm/audiovm.nix")
{
ghaf = lib.mkMerge (
[
{
hardware.x86_64.common.enable = true;

virtualization.microvm-host.enable = true;
virtualization.microvm-host.networkSupport = true;
host.networking.enable = true;

# Enable all the default UI applications
Expand Down Expand Up @@ -81,7 +89,6 @@ let
]
++ updateHostConfig {inherit lib; inherit targetconf;}
++ map (vm: importvm vms.${vm}) (builtins.attrNames vms)
++ (import "${ghafOS}/modules/module-list.nix")
++ extraModules
++ (if lib.hasAttr "extraModules" targetconf then targetconf.extraModules else []);
};
Expand All @@ -90,7 +97,7 @@ let
name = "${name}-${variant}";
package = hostConfiguration.config.system.build.${hostConfiguration.config.formatAttr};
};
debugModules = [(import "${ghafOS}/modules/development/usb-serial.nix") {ghaf.development.usb-serial.enable = true;}];
debugModules = [{ghaf.development.usb-serial.enable = true;}];
targets = [
(target "debug" debugModules)
(target "release" [])
Expand Down
6 changes: 3 additions & 3 deletions config-processor-installers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ let
modules =
[
self.nixosModules.installer
(import "${ghafOS}/modules/host")
self.nixosModules.ghaf-common

({modulesPath, lib, config, ...}: {
imports = [ (modulesPath + "/profiles/all-hardware.nix") ];

Expand Down Expand Up @@ -97,7 +98,6 @@ let
isoImage.squashfsCompression = "lz4";
}
]
++ (import "${ghafOS}/modules/module-list.nix")
++ extraModules
++ (if lib.hasAttr "extraModules" installerconf then installerconf.extraModules else []);
};
Expand All @@ -106,7 +106,7 @@ let
inherit installerImgCfg system;
installerImgDrv = installerImgCfg.config.system.build.${installerImgCfg.config.formatAttr};
};
debugModules = [(import "${ghafOS}/modules/development/usb-serial.nix") {ghaf.development.usb-serial.enable = true;}];
debugModules = [{ghaf.development.usb-serial.enable = true;}];
targets = [
(installer "debug" debugModules)
(installer "release" [])
Expand Down
Loading

0 comments on commit 1539e3f

Please sign in to comment.