nix-config/hosts/server10/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

98 lines
2.2 KiB
Nix
Raw Normal View History

2024-01-06 17:23:46 +01:00
{ config, lib, options, pkgs, ... }:
2022-05-14 20:33:56 +02:00
{
imports = [
./hardware-configuration.nix
2022-05-15 02:46:14 +02:00
./microvm-staging.nix
2022-06-12 17:26:32 +02:00
];
2022-08-05 18:19:12 +02:00
c3d2 = {
2023-05-19 21:38:16 +02:00
baremetal = true;
2022-08-05 18:19:12 +02:00
deployment.microvmBaseZfsDataset = "server10/vm";
hq.statistics.enable = true;
};
2022-06-12 17:26:32 +02:00
boot = {
2024-01-06 17:23:46 +01:00
loader.grub = lib.mkIf (!options?isoImage) {
2022-05-14 20:33:56 +02:00
enable = true;
device = "/dev/sda";
2022-06-12 17:26:32 +02:00
};
2022-05-14 20:33:56 +02:00
kernelParams = [
"preempt=none"
# No server/router runs any untrusted user code
"mitigations=off"
];
2023-06-16 20:08:33 +02:00
tmp = {
useTmpfs = true;
tmpfsSize = "80%";
};
2022-06-12 17:26:32 +02:00
};
2022-05-14 20:33:56 +02:00
disko.disks = [ {
device = "/dev/disk/by-id/ata-Samsung_SSD_860_EVO_1TB_S3Z9NB0M203733F";
name = "server10";
partitionTableFormat = "msdos";
withBoot = true;
withLuks = true;
} ];
2022-05-14 20:33:56 +02:00
networking = {
hostName = "server10";
# TODO: change that to something more random
hostId = "10101010";
2022-06-12 17:26:32 +02:00
};
2022-05-14 20:33:56 +02:00
2023-11-13 00:13:40 +01:00
# services = {
# ceph = {
# mds.package = pkgs.ceph_17_2;
# mgr.package = pkgs.ceph_17_2;
# mon.package = pkgs.ceph_17_2;
# osd.package = pkgs.ceph_17_2;
# rgw.package = pkgs.ceph_17_2;
# };
2023-06-23 18:23:17 +02:00
2023-11-13 00:13:40 +01:00
# # reserve resources for legacy MicroVMs
# nomad.settings.client.reserved = {
# cpu = 4200;
# # see /sys/fs/cgroup/system.slice/system-microvm.slice/memory.current
# memory = 28 * 1024;
# };
# };
2022-05-17 01:14:05 +02:00
2023-01-02 17:37:29 +01:00
simd.arch = "ivybridge";
2022-12-28 01:45:10 +01:00
sops = {
defaultSopsFile = ./secrets.yaml;
secrets."machine-id" = {
mode = "444";
path = "/etc/machine-id";
};
2023-11-13 00:13:40 +01:00
# secrets."ceph/osd.4/keyfile" = { };
2022-12-28 01:45:10 +01:00
};
# static list of microvms from other sources
microvm.autostart = [
"data-hoarder"
"staging-data-hoarder"
"borken-data-hoarder"
"tram-borzoi"
2023-06-08 14:33:39 +02:00
"uranus"
"dresden-zone"
];
2023-09-15 22:55:05 +02:00
2023-11-13 00:13:40 +01:00
# skyflake = {
# nomad.client.meta."c3d2.cpuSpeed" = "4";
# storage.ceph.osds = [{
# id = 4;
# fsid = "21ff9a57-c8d1-4cfa-8e01-c09ae0c2f0e3";
# path = "/dev/zvol/server10/ceph-osd.4";
# keyfile = config.sops.secrets."ceph/osd.4/keyfile".path;
# deviceClass = "ssd";
# }];
# # TODO: remove
# storage.ceph.package = lib.mkForce pkgs.ceph_17_2;
# };
2022-05-14 20:33:56 +02:00
system.stateVersion = "21.11"; # Did you read the comment?
}