This commit is contained in:
2025-01-29 21:33:37 +01:00
commit a2247c5b26
30 changed files with 1036 additions and 0 deletions

44
hosts/crocus/default.nix Normal file
View File

@@ -0,0 +1,44 @@
{
inputs,
modulesPath,
config,
...
}:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
inputs.disko.nixosModules.disko
./disk.nix
];
networking.hostName = "crocus";
networking.useDHCP = true;
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
services.prometheus = {
enable = true;
port = 9001;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
port = 9002;
};
};
scrapeConfigs = [
{
job_name = "crocus";
static_configs = [
{
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
}
];
}
];
};
}

32
hosts/crocus/disk.nix Normal file
View File

@@ -0,0 +1,32 @@
{
disko.devices.disk.os = {
device = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_48353082";
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 = "/";
};
};
};
};
};
}