forked from tiiuae/ghaf-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Joonas Rautiola <[email protected]>
- Loading branch information
Showing
7 changed files
with
185 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# SPDX-FileCopyrightText: 2022-2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ | ||
self, | ||
inputs, | ||
pkgs, | ||
... | ||
}: | ||
let | ||
# Vendored in, as brainstem isn't suitable for nixpkgs packaging upstream: | ||
# https://github.com/NixOS/nixpkgs/pull/313643 | ||
brainstem = pkgs.callPackage ../../pkgs/brainstem { }; | ||
in | ||
{ | ||
imports = | ||
[ | ||
./disk-config.nix | ||
inputs.sops-nix.nixosModules.sops | ||
inputs.disko.nixosModules.disko | ||
] | ||
++ (with self.nixosModules; [ | ||
common | ||
service-openssh | ||
user-vjuntunen | ||
user-flokli | ||
user-jrautiola | ||
user-mariia | ||
user-hrosten | ||
]); | ||
|
||
sops.defaultSopsFile = ./secrets.yaml; | ||
nixpkgs.hostPlatform = "x86_64-linux"; | ||
|
||
networking = { | ||
hostName = "testagent-dev"; | ||
useDHCP = true; | ||
}; | ||
|
||
boot = { | ||
loader = { | ||
systemd-boot.enable = true; | ||
efi.canTouchEfiVariables = true; | ||
}; | ||
|
||
initrd.availableKernelModules = [ | ||
"vmd" | ||
"xhci_pci" | ||
"ahci" | ||
"nvme" | ||
"usbhid" | ||
"usb_storage" | ||
"sd_mod" | ||
"sr_mod" | ||
"rtsx_pci_sdmmc" | ||
]; | ||
kernelModules = [ | ||
"kvm-intel" | ||
"sg" | ||
]; | ||
}; | ||
|
||
hardware = { | ||
enableRedistributableFirmware = true; | ||
cpu.intel.updateMicrocode = true; | ||
}; | ||
|
||
services.udev = { | ||
# Enable Acroname USB Smart switch, as well as LXA USB-SD-Mux support. | ||
packages = [ | ||
brainstem | ||
pkgs.usbsdmux | ||
]; | ||
|
||
# udev rules for test devices serial connections | ||
extraRules = '' | ||
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="FTD1BQQS", SYMLINK+="ttyORINNX1", MODE="0666", GROUP="dialout" | ||
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea71", ATTRS{serial}=="0642246B630C149011EC987B167DB04", ENV{ID_USB_INTERFACE_NUM}=="01", SYMLINK+="ttyRISCV1", MODE="0666", GROUP="dialout" | ||
''; | ||
}; | ||
|
||
environment.systemPackages = | ||
[ | ||
inputs.robot-framework.packages.${pkgs.system}.ghaf-robot | ||
brainstem | ||
] | ||
++ (with pkgs; [ | ||
minicom | ||
usbsdmux | ||
]); | ||
|
||
# Details of the hardware devices connected to this host | ||
environment.etc."jenkins/test_config.json".text = builtins.toJSON { addresses = { }; }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# SPDX-FileCopyrightText: 2022-2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ | ||
disko.devices = { | ||
disk = { | ||
vda = { | ||
device = "/dev/nvme0n1"; | ||
type = "disk"; | ||
content = { | ||
type = "gpt"; | ||
partitions = { | ||
boot = { | ||
type = "EF02"; | ||
size = "1M"; | ||
}; | ||
ESP = { | ||
type = "EF00"; | ||
size = "512M"; | ||
content = { | ||
type = "filesystem"; | ||
format = "vfat"; | ||
mountpoint = "/boot"; | ||
}; | ||
}; | ||
root = { | ||
size = "100%"; | ||
content = { | ||
type = "filesystem"; | ||
format = "ext4"; | ||
mountpoint = "/"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
ssh_host_ed25519_key: ENC[AES256_GCM,data:kexwr5dcadNAfx0Al5vZp2vyT3rtKiYbxS2FgvKJb+N6lBAR9oc2Puk9xzxGHvxjagjsPmgNGPFtBnqhRd0pMemhOXVqCEBHLVo/8xM0T/DQaTJ7aWX8cvhxiRihd9goKrjZPaIISf6HJ3o+tYV1gH2OjFgMk4/+mde2IbsOlIM/6WVTAt9SqPZIXKMIeGuHE30toiLuSQkBEcQDevGC5KBpub0+Dwoog2MymtOPpDWWV3bPi++h3GLGa375FYmzlpuKQUphKq/64/maDyMxNxfyaUQ++DmyorWUPZIJ5ZrnuG+31X2Nd2gnCCH4Gv17ms/Vw/zCB4wNmbg1QRQD5FBV6uFYCdhffaMznACAGp/PpritAuP9jkZNm0DfsSwiQzMJHPfi3oT77jIUUFI6E/HLOJXx5GwkAoLNtsOH8vMyNgRaVfDDkWguG3+4ungaY8aVYh1PIRME0Vfg5RIlKylUO3vg5lq7CubDX+oQ1eEymjhpKKMODyhrNSTVGRwH8mRKaU5fd+ZaMk95S75T,iv:mDBrCeAV+ID+tS2KtfEyASHNVPstdfDY+5QTP6PpPeU=,tag:0wc+C2+AfPaFiO9TJyAwzQ==,type:str] | ||
sops: | ||
kms: [] | ||
gcp_kms: [] | ||
azure_kv: [] | ||
hc_vault: [] | ||
age: | ||
- recipient: age1qjhxuh80tg2vq32kmwu2ne4vqvd8q2up7css30x0yefkrhq9jd0sxju3fa | ||
enc: | | ||
-----BEGIN AGE ENCRYPTED FILE----- | ||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA2bnBHUVRqelhwY1h5Nkk5 | ||
ZjlRWVFtc2s3V29uR3lGQXorTGlnRWF1dkIwCkxXSXJKNDZBOTFXMFhaekFra28v | ||
bCtsdDExd1F3d2d1cllBZkpQVWMrRVkKLS0tIFdaR2oxeGdYZmFORGNZa3NiVytP | ||
aDR5Y3ErMXQwalYvVUxuUVk1WUJlRDgK5j1S+AHuS/RZyTELUFQz4RCL45HGVEM/ | ||
3iMneLYaVf/DB8adCszoVz9vfS3M8gj8ux1wp+zD8mI0XQQypsH50Q== | ||
-----END AGE ENCRYPTED FILE----- | ||
- recipient: age1hszrldafdz09hzze4lgq58r0r66p4sjftn6q8z6h0leer77jhf4qd9vu9v | ||
enc: | | ||
-----BEGIN AGE ENCRYPTED FILE----- | ||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBjWU9qQ3d0T2lFWW5xZFor | ||
UVhNdkQrSnFheGJBUzZrc2RMQUF6QzVwV1Q0CkRYMFN1TSt0NkRSbUd6Zm1oMVhN | ||
aHJxWkY5RTJMRHpEVWdPNWpRNDR1aWcKLS0tIDdHejJWTGJBeHgvZk9OU2dzYWVM | ||
OTZQZlNpeUs4VVp4WUpsenJoa3lOMFEKqkHRnf2HR8RK6dumzIP7YA3fwsObUAJY | ||
NadtGsIUYrayP/SwYWlwkxWiXO1W+4ZjBd1o2lSnijVcYVwRMn4TJw== | ||
-----END AGE ENCRYPTED FILE----- | ||
- recipient: age194hljejmy63ph884cnuuume7z33txlkp9an7l3yt2n3sjjere52qkvlfju | ||
enc: | | ||
-----BEGIN AGE ENCRYPTED FILE----- | ||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBaU3RZVWdXcGVQRFk4d0Jk | ||
Nmovb0o5c0VDUE5LK0dSTmcyRjRCOW5vNFVvClJleU9hRHRQTktBUjhBVUZRZyta | ||
bUg5R1Y0SXpJK1JRM0FTV0c2dkNYTjAKLS0tIFJsTkR0MTVHVUJhYTBMS2RsaDJ5 | ||
Rlo2R1ptYm5XMHg2UmtvcUU1Tk54SE0K1t7u3DcamJpfxnw1yqnCOkLB/PaJcL3s | ||
22uolvbkTWVzJEa5zBtvMUgyAhXrzYlBQWs+QEH2fNLbqT818DgvfQ== | ||
-----END AGE ENCRYPTED FILE----- | ||
lastmodified: "2024-08-30T07:50:15Z" | ||
mac: ENC[AES256_GCM,data:0EX+NCSgd+tSkhxoLxe0oV46XH2bmWHc1GgcU52aU9Qvqjy6VzbH6eNRoJi1b9UeZJQQ49JKcvYSiokywiGSB5XKe7RD3nTdVMgOZI7hFoBu6FVV5ZyJ52em1wXeyLV/97KEBTc6DIMjmWRqrMSN69+Amgsgv8BpKhhERxReayw=,iv:SREkpT+Bjo1Z7AfX6KdgU8vExQcm8bAvIaBGqty32Y8=,tag:Bh86EWngLVGUP12zGOOZwg==,type:str] | ||
pgp: [] | ||
unencrypted_suffix: _unencrypted | ||
version: 3.8.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters