integrate settings raspberry pi
This commit is contained in:
parent
1683c4caa8
commit
25937f535b
6 changed files with 212 additions and 193 deletions
|
@ -1,7 +1,12 @@
|
|||
# TODO: Create a nixos module system for this. (mkMerge)
|
||||
# That way, we don't have to specify isRaspberryPi on every machine... etc.
|
||||
{
|
||||
warwick = {
|
||||
type = "physical";
|
||||
arch = "aarch64-linux";
|
||||
isRaspberryPi = true;
|
||||
isHypervisor = false;
|
||||
isVirtualMachine = false;
|
||||
|
||||
nixosModule.lab = {
|
||||
storage = {
|
||||
|
@ -13,6 +18,9 @@
|
|||
atlas = {
|
||||
type = "physical";
|
||||
arch = "x86_64-linux";
|
||||
isRaspberryPi = false;
|
||||
isHypervisor = true;
|
||||
isVirtualMachine = false;
|
||||
|
||||
nixosModule.lab = {
|
||||
storage = {
|
||||
|
@ -31,19 +39,20 @@
|
|||
jefke = {
|
||||
type = "physical";
|
||||
arch = "x86_64-linux";
|
||||
isRaspberryPi = false;
|
||||
isHypervisor = true;
|
||||
isVirtualMachine = false;
|
||||
|
||||
nixosModule = {
|
||||
lab = {
|
||||
storage = {
|
||||
osDisk = "/dev/sda";
|
||||
dataPartition = "/dev/nvme0n1p1";
|
||||
};
|
||||
nixosModule.lab = {
|
||||
storage = {
|
||||
osDisk = "/dev/sda";
|
||||
dataPartition = "/dev/nvme0n1p1";
|
||||
};
|
||||
|
||||
ssh = {
|
||||
useCertificates = true;
|
||||
hostCert = builtins.readFile ./certificates/jefke/host_ed25519.crt;
|
||||
userCert = builtins.readFile ./certificates/jefke/user_ed25519.crt;
|
||||
};
|
||||
ssh = {
|
||||
useCertificates = true;
|
||||
hostCert = builtins.readFile ./certificates/jefke/host_ed25519.crt;
|
||||
userCert = builtins.readFile ./certificates/jefke/user_ed25519.crt;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -51,6 +60,9 @@
|
|||
lewis = {
|
||||
type = "physical";
|
||||
arch = "x86_64-linux";
|
||||
isRaspberryPi = false;
|
||||
isHypervisor = true;
|
||||
isVirtualMachine = false;
|
||||
|
||||
nixosModule.lab = {
|
||||
backups.enable = true;
|
||||
|
@ -73,18 +85,23 @@
|
|||
hermes = {
|
||||
type = "virtual";
|
||||
hypervisorName = "lewis";
|
||||
isRaspberryPi = false;
|
||||
isVirtualMachine = true;
|
||||
isHypervisor = false;
|
||||
|
||||
nixosModule = { config, ... }: {
|
||||
lab = {
|
||||
networking.dmz.services.enable = true;
|
||||
networking = {
|
||||
dmz.services.enable = true;
|
||||
staticNetworking = true;
|
||||
staticIPv4 = config.lab.networking.dmz.ipv4.services;
|
||||
staticIPv6 = config.lab.networking.dmz.ipv6.services;
|
||||
};
|
||||
|
||||
vm = {
|
||||
# TODO: would be cool to create a check that a mac address is only ever assigned to one VM.
|
||||
# TODO: idea: what if we generated these IDs by hashing the host name and reducing that to the amount of hosts possible?
|
||||
id = 7;
|
||||
staticNetworking = true;
|
||||
staticIPv4 = config.lab.networking.dmz.ipv4.services;
|
||||
staticIPv6 = config.lab.networking.dmz.ipv6.services;
|
||||
|
||||
shares = [{
|
||||
name = "dnsmasq";
|
||||
|
@ -98,6 +115,9 @@
|
|||
maestro = {
|
||||
type = "virtual";
|
||||
hypervisorName = "atlas";
|
||||
isRaspberryPi = false;
|
||||
isVirtualMachine = false;
|
||||
isHypervisor = false;
|
||||
|
||||
nixosModule = { config, ... }: {
|
||||
microvm.balloonMem = 7680;
|
||||
|
@ -115,6 +135,9 @@
|
|||
bancomart = {
|
||||
type = "virtual";
|
||||
hypervisorName = "jefke";
|
||||
isRaspberryPi = false;
|
||||
isVirtualMachine = false;
|
||||
isHypervisor = false;
|
||||
|
||||
nixosModule = {
|
||||
microvm.balloonMem = 7680;
|
||||
|
@ -129,6 +152,9 @@
|
|||
vpay = {
|
||||
type = "virtual";
|
||||
hypervisorName = "lewis";
|
||||
isRaspberryPi = false;
|
||||
isVirtualMachine = false;
|
||||
isHypervisor = false;
|
||||
|
||||
nixosModule = {
|
||||
microvm.balloonMem = 5120;
|
||||
|
|
Reference in a new issue