nixos-servers/nixos/modules/default.nix

33 lines
770 B
Nix

{ lib, config, ... }:
let cfg = config.lab;
in
{
imports = [
./storage.nix
./terraform-database
./ssh-certificates.nix
./k3s
./backups.nix
./networking
./data-sharing.nix
./globals.nix
];
# TODO: remove this option; make this explicit on the host.
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.dataHost.enable {
backups.enable = true;
data-sharing.enable = true;
networking.dmz.allowConnectivity = true;
};
}