nix-config/hosts/server9/default.nix

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

76 lines
1.5 KiB
Nix
Raw Normal View History

2023-01-07 02:54:35 +01:00
{ config, ... }:
2022-06-18 01:07:43 +02:00
{
imports = [
./hardware-configuration.nix
];
c3d2 = {
2023-05-19 21:38:16 +02:00
baremetal = true;
deployment.microvmBaseZfsDataset = "tank/storage";
hq.statistics.enable = true;
};
boot = {
2022-06-18 01:07:43 +02:00
loader.grub = {
enable = true;
version = 2;
2022-06-21 14:11:31 +02:00
device = "/dev/sdc";
2022-06-18 01:07:43 +02:00
};
kernelParams = [
"preempt=none"
# No server/router runs any untrusted user code
"mitigations=off"
];
tmpOnTmpfs = true;
tmpOnTmpfsSize = "80%";
};
networking = {
hostName = "server9";
hostId = "09090909";
};
2022-06-18 02:36:36 +02:00
# required by libvirtd
security.polkit.enable = true;
2022-06-29 20:04:57 +02:00
2023-05-19 21:38:16 +02:00
# reserve resources for libvirt VMs
services.nomad.settings.client.reserved = {
cpu = 2300;
memory = 16 * 1024;
};
2023-01-02 17:37:29 +01:00
simd.arch = "westmere";
nix.settings.system-features = [
"kvm" "big-parallel"
"nixos-test" "benchmark"
];
2023-01-02 17:37:29 +01:00
2022-12-28 01:45:10 +01:00
sops = {
defaultSopsFile = ./secrets.yaml;
secrets."machine-id" = {
mode = "444";
path = "/etc/machine-id";
};
2023-01-07 02:54:35 +01:00
secrets."ceph/osd.3/keyfile" = {};
2022-12-28 01:45:10 +01:00
};
skyflake.nomad.client.meta."c3d2.cpuSpeed" = "3";
2023-01-07 02:54:35 +01:00
skyflake.storage.ceph.osds = [ {
id = 3;
fsid = "54d56ab8-fc43-4e16-886d-3c82dcc1f8fe";
path = "/dev/zvol/tank/ceph-osd.3";
keyfile = config.sops.secrets."ceph/osd.3/keyfile".path;
deviceClass = "hdd";
} ];
2022-06-21 14:10:59 +02:00
system.stateVersion = "21.11";
2023-05-19 21:38:16 +02:00
# TODO: enable for zw-ev and poelzi-ha until we find a better solution
2022-06-21 14:10:59 +02:00
virtualisation.libvirtd = {
enable = true;
onShutdown = "shutdown";
};
2022-06-18 01:07:43 +02:00
}