migrate data from thecloud.dmz to lewis.dmz

install tcpdump
This commit is contained in:
Pim Kunis 2024-01-01 13:16:11 +01:00
parent 3981805a6b
commit 5884585b3a
20 changed files with 86 additions and 48 deletions

View file

@ -1,8 +1,18 @@
{ pkgs, lib, config, ... }:
let
cfg = config.lab.thecloud;
cfg = config.lab.data-sharing;
nfsShares = [
"/ancient"
"/nextcloud/data"
"/radicale"
"/freshrss/data"
"/freshrss/extensions"
"/pihole/data"
"/pihole/dnsmasq"
"/hedgedoc/uploads"
"/traefik/acme"
"/forgejo"
"/kitchenowl/data"
"/syncthing/config"
];
nfsExports = lib.strings.concatLines (
builtins.map
@ -13,17 +23,17 @@ let
);
in
{
options.lab.thecloud = {
options.lab.data-sharing = {
enable = lib.mkOption {
default = false;
type = lib.types.bool;
description = ''
Experimental: migrate thecloud.dmz to hypervisor.
Configure this server to serve our data using NFS and PostgreSQL.
'';
};
nfsRoot = lib.mkOption {
default = "/mnt/data";
default = "/mnt/data/nfs";
type = lib.types.str;
description = ''
Root directory of NFS data.
@ -40,7 +50,12 @@ in
};
config = lib.mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [ 2049 5432 ];
networking.firewall.allowedTCPPorts = [
2049 # NFS
5432 # PostgeSQL
111 # NFS
20048 # NFS
];
services = {
nfs.server = {

View file

@ -7,6 +7,6 @@
./disko.nix
./backups.nix
./networking.nix
./thecloud.nix
./data-sharing.nix
];
}

View file

@ -33,6 +33,10 @@ in {
netdevConfig = {
Kind = "bridge";
Name = "bridgedmz";
# TODO: This does not seem to work? Unsure what the problem is.
# We don't necessary need this though: we simply use DNS as the host.
# MACAddress = lib.mkIf cfg.allowDMZConnectivity "CA:FE:C0:FF:EE:0A";
# MACAddress = "ca:fe:c0:ff:ee:0a";
};
};
};