nix-config/hosts/staging-data-hoarder/default.nix

92 lines
2.4 KiB
Nix
Raw Normal View History

2022-05-14 21:48:51 +02:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
2022-10-02 22:14:34 +02:00
{ config, self, ... }:
2022-10-03 02:20:48 +02:00
let
mac_addr = "00:de:5b:f9:e2:3d";
in
2022-05-14 21:48:51 +02:00
{
2022-05-14 22:47:54 +02:00
microvm = {
vcpu = 4;
mem = 4096;
hypervisor = "cloud-hypervisor";
socket = "${config.networking.hostName}.socket";
2022-05-15 02:04:01 +02:00
2022-05-28 21:24:15 +02:00
interfaces = [{
2022-05-15 02:04:01 +02:00
type = "tap";
2022-06-16 21:52:50 +02:00
id = "serv-dvb-stag";
2022-10-03 02:20:48 +02:00
mac = mac_addr;
2022-05-28 21:24:15 +02:00
}];
2022-05-15 02:04:01 +02:00
2022-05-28 21:24:15 +02:00
shares = [{
2022-05-15 02:04:01 +02:00
source = "/nix/store";
mountPoint = "/nix/.ro-store";
tag = "store";
proto = "virtiofs";
socket = "store.socket";
2022-05-28 21:24:15 +02:00
}
{
source = "/var/lib/microvms/staging-data-hoarder/etc";
mountPoint = "/etc";
tag = "etc";
proto = "virtiofs";
socket = "etc.socket";
}
{
source = "/var/lib/microvms/staging-data-hoarder/var";
mountPoint = "/var";
tag = "var";
proto = "virtiofs";
socket = "var.socket";
}];
2022-05-14 22:47:54 +02:00
};
2022-05-14 21:48:51 +02:00
2022-10-02 21:39:37 +02:00
networking.hostName = "staging-data-hoarder";
2022-05-14 21:48:51 +02:00
time.timeZone = "Europe/Berlin";
2022-10-02 21:39:37 +02:00
networking.useNetworkd = true;
2022-05-14 21:48:51 +02:00
sops.defaultSopsFile = self + /secrets/data-hoarder-staging/secrets.yaml;
2022-12-30 18:29:13 +01:00
deployment-TLMS.net = {
2022-10-02 21:39:37 +02:00
iface.uplink = {
2022-10-03 01:40:37 +02:00
name = "ens3";
2022-10-03 02:20:48 +02:00
mac = mac_addr;
matchOn = "mac";
2022-10-02 21:39:37 +02:00
useDHCP = false;
2022-10-02 22:31:21 +02:00
addr4 = "172.20.73.64/25";
2022-10-02 21:39:37 +02:00
dns = [ "172.20.73.8" "9.9.9.9" ];
routes = [
{
routeConfig = {
Gateway = "172.20.73.1";
2022-10-02 22:55:27 +02:00
GatewayOnLink = true;
2022-10-02 21:39:37 +02:00
Destination = "0.0.0.0/0";
};
}
];
};
wg = {
addr4 = "10.13.37.5";
prefix4 = 24;
privateKeyFile = config.sops.secrets.wg-seckey.path;
publicKey = "48hc7DVnUh2DHYhrxrNtNzj05MRecJO52j2niPImvkU=";
};
2022-05-14 21:48:51 +02:00
2022-05-28 21:24:15 +02:00
};
2022-05-15 18:31:48 +02:00
2022-12-30 18:29:13 +01:00
deployment-TLMS.domain = "staging.dvb.solutions";
2022-10-02 21:39:37 +02:00
2022-05-14 21:48:51 +02:00
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.11"; # Did you read the comment?
}