nixos-servers/nixos/modules/default.nix

32 lines
689 B
Nix
Raw Normal View History

{ lib, config, ... }:
2024-01-14 16:59:32 +00:00
let cfg = config.lab;
in
2023-11-24 12:52:51 +00:00
{
imports = [
2024-01-06 23:22:44 +00:00
./storage.nix
./terraform-database
./ssh-certificates.nix
./k3s
./backups.nix
2024-01-07 22:06:27 +00:00
./networking
./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.
'';
};
2024-01-14 16:59:32 +00:00
config.lab = lib.mkIf cfg.dataHost.enable {
backups.enable = true;
data-sharing.enable = true;
networking.allowDMZConnectivity = true;
};
2023-11-24 12:52:51 +00:00
}