Skip to content

Commit d51512d

Browse files
fix: formatting according and statix
Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
1 parent a225d01 commit d51512d

File tree

4 files changed

+37
-31
lines changed

4 files changed

+37
-31
lines changed

modules/common/global-config.nix

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,23 @@
3030
};
3131

3232
config = {
33-
# Populate platform information from host config
34-
ghaf.global-config.platform = {
35-
buildSystem = lib.mkDefault config.nixpkgs.buildPlatform.system;
36-
hostSystem = lib.mkDefault config.nixpkgs.hostPlatform.system;
37-
timeZone = lib.mkDefault (if config.time.timeZone != null then config.time.timeZone else "UTC");
38-
};
33+
ghaf.global-config = {
34+
# Populate platform information from host config
35+
platform = {
36+
buildSystem = lib.mkDefault config.nixpkgs.buildPlatform.system;
37+
hostSystem = lib.mkDefault config.nixpkgs.hostPlatform.system;
38+
timeZone = lib.mkDefault (if config.time.timeZone != null then config.time.timeZone else "UTC");
39+
};
3940

40-
# Propagate host storeOnDisk setting to global-config for VMs
41-
ghaf.global-config.storage.storeOnDisk = lib.mkIf config.ghaf.virtualization.microvm.storeOnDisk true;
41+
# Propagate host storeOnDisk setting to global-config for VMs
42+
storage.storeOnDisk = lib.mkIf config.ghaf.virtualization.microvm.storeOnDisk true;
4243

43-
# Auto-populate logging listener address from admin-vm IP
44-
# The logging listener always runs on admin-vm, so derive the address
45-
# from hosts.nix rather than requiring each profile to set it manually.
46-
ghaf.global-config.logging.listener.address = lib.mkIf (
47-
config.ghaf.global-config.logging.enable && config.ghaf.common.adminHost != null
48-
) (lib.mkDefault config.ghaf.networking.hosts.admin-vm.ipv4);
44+
# Auto-populate logging listener address from admin-vm IP
45+
# The logging listener always runs on admin-vm, so derive the address
46+
# from hosts.nix rather than requiring each profile to set it manually.
47+
logging.listener.address = lib.mkIf (
48+
config.ghaf.global-config.logging.enable && config.ghaf.common.adminHost != null
49+
) (lib.mkDefault config.ghaf.networking.hosts.admin-vm.ipv4);
50+
};
4951
};
5052
}

modules/profiles/laptop-x86.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ in
217217
vmCfg = config.ghaf.virtualization.vmConfig.appvms.${vmDef.name} or { };
218218
effectiveDef =
219219
vmDef
220-
// lib.optionalAttrs (vmCfg.ramMb or null != null) { inherit (vmCfg) ramMb; }
221-
// lib.optionalAttrs (vmCfg.cores or null != null) { inherit (vmCfg) cores; };
220+
// lib.optionalAttrs (vmCfg ? ramMb) { inherit (vmCfg) ramMb; }
221+
// lib.optionalAttrs (vmCfg ? cores) { inherit (vmCfg) cores; };
222222
in
223223
lib.nixosSystem {
224224
modules = [

modules/reference/hardware/flake-module.nix

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@
4040
{
4141
ghaf.hardware = {
4242
passthrough = {
43-
pci.autoDetectGpu = true;
44-
pci.autoDetectNet = true;
45-
pci.autoDetectAudio = true;
43+
pci = {
44+
autoDetectGpu = true;
45+
autoDetectNet = true;
46+
autoDetectAudio = true;
47+
};
4648
pciAcsOverride = {
4749
enable = true;
4850
ids = [

modules/reference/profiles/mvp-user-trial.nix

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,22 @@ in
102102
# Reference services and personalization
103103
../services
104104
../personalize
105-
{ ghaf.reference.personalize.keys.enable = true; }
106105
# Forward host reference services config to netvm
107106
{
108-
ghaf.reference.services = {
109-
inherit (config.ghaf.reference.services)
110-
enable
111-
dendrite
112-
proxy-business
113-
;
114-
google-chromecast = {
115-
inherit (config.ghaf.reference.services.google-chromecast) enable vmName;
116-
};
117-
chromecast = {
118-
inherit (config.ghaf.reference.services.chromecast) externalNic internalNic;
107+
ghaf.reference = {
108+
personalize.keys.enable = true;
109+
services = {
110+
inherit (config.ghaf.reference.services)
111+
enable
112+
dendrite
113+
proxy-business
114+
;
115+
google-chromecast = {
116+
inherit (config.ghaf.reference.services.google-chromecast) enable vmName;
117+
};
118+
chromecast = {
119+
inherit (config.ghaf.reference.services.chromecast) externalNic internalNic;
120+
};
119121
};
120122
};
121123
}

0 commit comments

Comments
 (0)