nixos-servers/nixos/machines/default.nix

93 lines
2.1 KiB
Nix
Raw Normal View History

{
atlas = {
type = "physical";
nixosModule.lab = {
storage = {
osDisk = "/dev/sda";
dataPartition = "/dev/nvme0n1p1";
};
ssh = {
useCertificates = true;
hostCert = builtins.readFile ./certificates/atlas/host_ed25519.crt;
userCert = builtins.readFile ./certificates/atlas/user_ed25519.crt;
};
};
};
jefke = {
2024-01-28 10:48:13 +00:00
type = "physical";
nixosModule = {
lab = {
terraformDatabase.enable = true;
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;
};
};
};
};
lewis = {
2024-01-28 10:48:13 +00:00
type = "physical";
nixosModule.lab = {
backups.enable = true;
data-sharing.enable = true;
networking.dmz.allowConnectivity = true;
storage = {
osDisk = "/dev/sda";
dataPartition = "/dev/nvme0n1p1";
};
2024-01-17 20:28:15 +00:00
ssh = {
useCertificates = true;
hostCert = builtins.readFile ./certificates/lewis/host_ed25519.crt;
userCert = builtins.readFile ./certificates/lewis/user_ed25519.crt;
};
2024-01-28 10:48:13 +00:00
};
};
2024-01-28 10:48:13 +00:00
my-microvm = {
type = "virtual";
hypervisorName = "lewis";
2024-01-17 20:28:15 +00:00
2024-01-28 12:57:36 +00:00
nixosModule = { pkgs, ... }: {
# TODO: would be cool to create a check that a mac address is only ever assigned to one VM.
lab.vm.id = 0;
2024-01-28 12:57:36 +00:00
2024-01-28 10:48:13 +00:00
programs.bash.interactiveShellInit = ''
echo "Hello world from inside a virtual machine!!" | ${pkgs.lolcat}/bin/lolcat
2024-01-28 10:48:13 +00:00
'';
};
};
2024-01-29 21:21:15 +00:00
hermes = {
type = "virtual";
hypervisorName = "lewis";
nixosModule = { config, ... }: {
2024-01-29 21:21:15 +00:00
lab = {
2024-01-31 20:58:23 +00:00
networking.dmz.services.enable = true;
vm = {
id = 7;
staticNetworking = true;
2024-01-31 20:58:23 +00:00
staticIPv4 = config.lab.networking.dmz.ipv4.services;
staticIPv6 = config.lab.networking.dmz.ipv6.services;
};
2024-01-29 21:21:15 +00:00
};
};
};
}