{ lib, config, ... }: let cfg = config.lab.dataHost; in { imports = [ ./terraform-database ./data-disk.nix ./ssh-certificates.nix ./k3s ./disko.nix ./backups.nix ./networking.nix ./data-sharing.nix ]; options.lab.dataHost.enable = lib.mkOption { default = false; type = lib.types.bool; description = '' Whether this machine holds application data. This enables NFS and PostgreSQL to serve this data, and sets up backups. Also enables networking on the DMZ to enable serving data. ''; }; config.lab = lib.mkIf cfg.enable { backups.enable = true; data-sharing.enable = true; networking.allowDMZConnectivity = true; }; }