nix-config/hosts/data-hoarder/configuration.nix

74 lines
2.1 KiB
Nix
Raw Normal View History

2022-04-23 23:49:00 +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-07-10 00:49:37 +02:00
microvm = {
hypervisor = "cloud-hypervisor";
2022-07-10 22:13:11 +02:00
mem = 4096;
vcpu = 8;
interfaces = [ {
2022-07-10 00:49:37 +02:00
type = "tap";
2022-07-10 22:13:11 +02:00
id = "serv-dvb-prod";
mac = "02:db:db:db:db:db";
} ];
2022-08-20 23:49:51 +02:00
shares = [
{
source = "/nix/store";
mountPoint = "/nix/.ro-store";
tag = "store";
proto = "virtiofs";
socket = "store.socket";
}
2022-07-10 00:49:37 +02:00
{
source = "/var/lib/microvms/data-hoarder/etc";
mountPoint = "/etc";
tag = "etc";
proto = "virtiofs";
socket = "etc.socket";
2022-08-20 23:49:51 +02:00
}
2022-07-10 00:49:37 +02:00
{
source = "/var/lib/microvms/data-hoarder/var";
mountPoint = "/var";
tag = "var";
proto = "virtiofs";
socket = "var.socket";
2022-08-20 23:49:51 +02:00
}
];
2022-07-10 00:49:37 +02:00
};
2022-04-23 23:49:00 +02:00
networking.hostName = "data-hoarder"; # Define your hostname.
# Set your time zone.
time.timeZone = "Europe/Berlin";
2022-07-10 00:49:37 +02:00
networking.interfaces.eth0 = {
useDHCP = false;
ipv4.addresses = [
{
2022-07-10 22:13:11 +02:00
address = "172.20.73.69";
prefixLength = 25;
}
];
};
2022-04-23 23:49:00 +02:00
2022-07-10 00:49:37 +02:00
networking.defaultGateway = "172.20.73.1";
networking.nameservers = [ "172.20.73.8" "9.9.9.9" ];
2022-04-23 23:49:00 +02:00
2022-05-31 21:29:48 +02:00
sops.defaultSopsFile = ../../secrets/data-hoarder/secrets.yaml;
2022-04-23 23:49:00 +02:00
# Open ports in the firewall.
2022-05-27 23:49:08 +02:00
networking.firewall.allowedTCPPorts = [ 80 443 22 51820 ];
networking.firewall.trustedInterfaces = [ "wg-dvb" ];
networking.firewall.allowedUDPPorts = [ 22 51820 ];
2022-04-23 23:49:00 +02:00
# Or disable the firewall altogether.
networking.firewall.enable = true;
2022-04-23 23:49:00 +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).
2022-07-10 00:49:37 +02:00
system.stateVersion = "22.05";
2022-04-23 23:49:00 +02:00
}