nixos-servers/nixos/machines/default.nix

93 lines
2.1 KiB
Nix
Raw Normal View History

{
jefke = {
2024-01-28 10:48:13 +00:00
type = "physical";
nixosModule = {
2024-01-28 12:46:32 +00:00
networking.hostName = "jefke";
lab = {
terraformDatabase.enable = true;
storage = {
osDisk = "/dev/sda";
dataPartition = "/dev/nvme0n1p1";
};
ssh = {
useCertificates = true;
# TODO: automatically set this?
hostCert = builtins.readFile ./jefke_host_ed25519-cert.pub;
userCert = builtins.readFile ./jefke_user_ed25519-cert.pub;
};
};
};
};
2023-11-29 16:21:18 +00:00
atlas = {
2024-01-28 10:48:13 +00:00
type = "physical";
nixosModule = { config, ... }:
2024-01-14 14:20:32 +00:00
let inherit (config.lab.networking) dmzServicesIPv4 dmzServicesIPv6; in
{
2024-01-28 12:46:32 +00:00
networking.hostName = "atlas";
lab = {
networking = {
2024-01-14 14:20:32 +00:00
# TODO: Ideally, we don't have to set this here.
staticDMZIPv4Address = "${dmzServicesIPv4}/24";
staticDMZIPv6Address = "${dmzServicesIPv6}/64";
dmzServices.enable = true;
};
storage = {
osDisk = "/dev/sda";
dataPartition = "/dev/nvme0n1p1";
};
2023-12-16 22:47:18 +00:00
ssh = {
useCertificates = true;
hostCert = builtins.readFile ./atlas_host_ed25519-cert.pub;
userCert = builtins.readFile ./atlas_user_ed25519-cert.pub;
};
};
2023-11-29 16:21:18 +00:00
};
};
lewis = {
2024-01-28 10:48:13 +00:00
type = "physical";
2024-01-28 12:57:36 +00:00
nixosModule = {
2024-01-28 12:46:32 +00:00
networking.hostName = "lewis";
2024-01-17 20:28:15 +00:00
lab = {
dataHost.enable = true;
2024-01-17 20:28:15 +00:00
storage = {
osDisk = "/dev/sda";
dataPartition = "/dev/nvme0n1p1";
};
ssh = {
useCertificates = true;
hostCert = builtins.readFile ./lewis_host_ed25519-cert.pub;
userCert = builtins.readFile ./lewis_user_ed25519-cert.pub;
};
};
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, ... }: {
networking.hostName = "my-microvm";
lab.vmMacAddress = "BA:DB:EE:F0: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
'';
};
};
}