Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FMO-81: Merge fmo-os images into fmo-os-x86_64 #92

Merged
merged 1 commit into from
Dec 12, 2024
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
3 changes: 2 additions & 1 deletion config-processor-hardware.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}: sysconf:
let
inherit (import ./utils {inherit lib self ghafOS;})
updateAttrs updateHostConfig addCustomLaunchers addSystemPackages importvm generateFMOToolConfig;
updateAttrs updateHostConfig addHardwareInfo addCustomLaunchers addSystemPackages importvm generateFMOToolConfig;

targetconf = sysconf;
name = targetconf.name;
Expand Down Expand Up @@ -48,6 +48,7 @@ let
++ (importvm targetconf.vms)
++ (updateHostConfig targetconf)
++ (generateFMOToolConfig targetconf)
++ (if lib.hasAttr "device-info" targetconf then addHardwareInfo (import targetconf.device-info) else [])
++ (if lib.hasAttr "extraModules" targetconf then targetconf.extraModules else []);
};
in {
Expand Down
6 changes: 2 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@
});

hwConfigs = [
(import ./hardware/fmo-os-rugged-laptop-7330.nix)
(import ./hardware/fmo-os-rugged-laptop-7330-public.nix)
(import ./hardware/fmo-os-rugged-tablet-7230.nix)
(import ./hardware/fmo-os-rugged-tablet-7230-public.nix)
(import ./hardware/fmo-os-rugged-devices.nix)
(import ./hardware/fmo-os-rugged-devices-public.nix)
];
instConfigs = [
(import ./installers/fmo-os-installer.nix)
Expand Down
35 changes: 35 additions & 0 deletions hardware/device-info/rugged-devices.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
#
# FMO PCI-device maps for rugged devices
{
# Device information of Dell Rugged Tablet 7230
"0BB7 Latitude 7230 Rugged Extreme Tablet" = {
touchDevices = [
"3823:49156:EETI8082:00_0EEF:C004"
];
pciDevices = {
netvm = [
"0000:00:14.3"
];
dockervm = [];
};
};
# Device information of Dell Rugged Laptop 7330
"0A9E Latitude 7330 Rugged Extreme" = {
touchDevices = [
"3823:49155:CUST0000:00_0EEF:C003"
];
pciDevices = {
netvm = [
"0000:72:00.0"
"0000:00:1f.0"
"0000:00:1f.3"
"0000:00:1f.4"
"0000:00:1f.5"
"0000:00:1f.6"
];
dockervm = [];
};
};
}
4 changes: 4 additions & 0 deletions hardware/example.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"tcpdump"
]; # systemPackages

# Optional
# File containing information about VMs and pci-devices passed through
# device-info = ./device-info/rugged-devices.nix;

# VMs description
vms = {
# NetVM -- the network VM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# fmo-os-disabled-for-public -target
{
sysconf = {
extend = "./fmo-os-rugged-tablet-7230.nix";
name = "fmo-os-rugged-tablet-7230-public";
extend = "./fmo-os-rugged-devices.nix";
name = "fmo-os-rugged-devices-public";
extraModules = [
{
services = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
#
# fmo-os-rugged-tablet-7230 computer -target
# fmo-os-rugged-devices computer -target
{
sysconf = {
name = "fmo-os-rugged-tablet-7230";
name = "fmo-os-rugged-devices";
ipaddr = "192.168.101.2";
defaultgw = "192.168.101.1";
release = "v1.1.0a";
Expand All @@ -13,6 +13,8 @@
RAversion = "v0.8.4";
};

device-info = ./device-info/rugged-devices.nix;

systemPackages = [
"vim"
"tcpdump"
Expand Down Expand Up @@ -65,10 +67,6 @@
'';
}; # services.udev
}; # services
ghaf.graphics.sway.extraConfig = ''
# Map touch screen input to internal display
input "3823:49156:EETI8082:00_0EEF:C004" map_to_output "eDP-1"
''; # graphics.sway
}
]; # extraModules;

Expand All @@ -82,11 +80,6 @@
"vim"
"tcpdump"
]; # systemPackages
pciDevices = [
{
path = "0000:00:14.3";
}
]; # pciDevices
extraModules = [
{
users.users."ghaf".extraGroups = ["networkmanager"];
Expand Down Expand Up @@ -240,7 +233,6 @@
"tcpdump"
"gpsd"
]; # systemPackages
pciDevices = [];
extraModules = [
{
users.users."ghaf".extraGroups = ["docker" "dialout"];
Expand Down
30 changes: 0 additions & 30 deletions hardware/fmo-os-rugged-laptop-7330-public.nix

This file was deleted.

Loading
Loading