treefmt / nix fmt (pull_request) Successful in 5s
pytest / pytest (pull_request) Successful in 30s
test ebook search / test-ebook-search (pull_request) Successful in 34s
build_systems / build-brain (pull_request) Successful in 49s
build_systems / build-bob (pull_request) Successful in 50s
build_systems / build-rhapsody-in-green (pull_request) Successful in 1m2s
build_systems / build-jeeves (pull_request) Successful in 2m14s
- scrape Portal-1 node metrics over Tailscale - add a hardened Vultr billing and bandwidth exporter - provision host health and infrastructure cost dashboards
58 lines
1.0 KiB
Nix
58 lines
1.0 KiB
Nix
{
|
|
inputs,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
inputs.disko.nixosModules.disko
|
|
"${inputs.self}/users/richie"
|
|
"${inputs.self}/common/global"
|
|
"${inputs.self}/common/optional/tailscale.nix"
|
|
./disk-config.nix
|
|
./haproxy
|
|
./monitoring.nix
|
|
];
|
|
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
|
|
boot = {
|
|
# Avoid consuming the VM's limited memory for /tmp.
|
|
tmp.useTmpfs = false;
|
|
|
|
# The Vultr system disk and NIC are exposed as virtio devices.
|
|
initrd.availableKernelModules = [
|
|
"virtio_pci"
|
|
"virtio_blk"
|
|
"virtio_scsi"
|
|
"sd_mod"
|
|
];
|
|
};
|
|
|
|
networking = {
|
|
hostName = "portal-1";
|
|
useDHCP = lib.mkDefault true;
|
|
|
|
firewall = {
|
|
enable = true;
|
|
allowedTCPPorts = [ 278 ];
|
|
};
|
|
};
|
|
|
|
services.openssh.ports = [ 278 ];
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
curl
|
|
htop
|
|
vim
|
|
];
|
|
|
|
# The VM uses its regular swap instead of compressed RAM swap.
|
|
zramSwap.enable = false;
|
|
|
|
time.timeZone = "Etc/UTC";
|
|
|
|
system.stateVersion = "24.05";
|
|
}
|