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’).
|
|
|
|
|
|
|
|
|
|
{ config, pkgs, inputs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[
|
|
|
|
|
# Enabled modules
|
|
|
|
|
../../modules/base.nix
|
|
|
|
|
];
|
|
|
|
|
|
2022-05-14 22:47:54 +02:00
|
|
|
|
microvm = {
|
|
|
|
|
vcpu = 4;
|
|
|
|
|
mem = 4096;
|
|
|
|
|
hypervisor = "cloud-hypervisor";
|
2022-05-15 02:04:01 +02:00
|
|
|
|
|
|
|
|
|
interfaces = [ {
|
|
|
|
|
type = "tap";
|
|
|
|
|
id = "staging-dh";
|
|
|
|
|
mac = "00:de:5b:f9:e2:3d";
|
|
|
|
|
} ];
|
|
|
|
|
|
|
|
|
|
shares = [ {
|
|
|
|
|
source = "/nix/store";
|
|
|
|
|
mountPoint = "/nix/.ro-store";
|
|
|
|
|
tag = "store";
|
|
|
|
|
proto = "virtiofs";
|
|
|
|
|
socket = "store.socket";
|
|
|
|
|
} {
|
2022-05-15 02:10:08 +02:00
|
|
|
|
source = "/var/lib/microvms/staging-data-hoarder/etc";
|
2022-05-15 02:04:01 +02:00
|
|
|
|
mountPoint = "/etc";
|
|
|
|
|
tag = "etc";
|
|
|
|
|
proto = "virtiofs";
|
|
|
|
|
socket = "etc.socket";
|
|
|
|
|
} {
|
2022-05-15 02:10:08 +02:00
|
|
|
|
source = "/var/lib/microvms/staging-data-hoarder/var";
|
2022-05-15 02:04:01 +02:00
|
|
|
|
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
|
|
|
|
|
|
|
|
|
networking.hostName = "staging-data-hoarder"; # Define your hostname.
|
|
|
|
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Europe/Berlin";
|
2022-05-15 00:43:24 +02:00
|
|
|
|
networking.interfaces.eth0 = {
|
2022-05-14 21:48:51 +02:00
|
|
|
|
useDHCP = false;
|
2022-05-15 00:43:24 +02:00
|
|
|
|
ipv4.addresses = [ {
|
|
|
|
|
address = "172.20.73.64";
|
|
|
|
|
prefixLength = 25;
|
|
|
|
|
} ];
|
2022-05-14 21:48:51 +02:00
|
|
|
|
};
|
|
|
|
|
|
2022-05-15 00:43:24 +02:00
|
|
|
|
networking.defaultGateway = "172.20.73.1";
|
|
|
|
|
networking.nameservers = [ "172.20.73.8" "9.9.9.9" ];
|
2022-05-14 21:48:51 +02:00
|
|
|
|
|
|
|
|
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
|
|
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
|
|
|
|
|
|
|
|
# Open ports in the firewall.
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 22 8080 51820 ];
|
|
|
|
|
networking.firewall.allowedUDPPorts = [ 22 51820 ];
|
|
|
|
|
# Or disable the firewall altogether.
|
|
|
|
|
networking.firewall.enable = true;
|
|
|
|
|
|
2022-05-15 02:54:26 +02:00
|
|
|
|
dvb-dump.domain = "staging.dvb.solutions";
|
2022-05-15 18:31:48 +02:00
|
|
|
|
networking.wg-quick.interfaces.wg-dvb = {
|
|
|
|
|
address = [ "10.13.37.5/32" ];
|
2022-05-15 22:25:15 +02:00
|
|
|
|
privateKeyFile = "/var/wg-seckey";
|
2022-05-15 18:31:48 +02:00
|
|
|
|
postUp = '' ${pkgs.iputils}/bin/ping -c 10 10.13.37.1 || true '';
|
|
|
|
|
peers = [
|
|
|
|
|
{
|
|
|
|
|
publicKey = "WDvCObJ0WgCCZ0ORV2q4sdXblBd8pOPZBmeWr97yphY=";
|
|
|
|
|
allowedIPs = [ "10.13.37.0/24" ];
|
|
|
|
|
endpoint = "academicstrokes.com:51820";
|
|
|
|
|
persistentKeepalive = 25;
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2022-05-15 02:54:26 +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. It‘s 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?
|
|
|
|
|
|
|
|
|
|
}
|