mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
chore(monitoring): separate external machines
This commit is contained in:
parent
d5fb12ad9a
commit
bd6f16cd4f
4 changed files with 23 additions and 8 deletions
|
|
@ -206,11 +206,20 @@ in {
|
|||
default = domain;
|
||||
};
|
||||
global.enable = mkEnableOption "globally routeable";
|
||||
online.enable =
|
||||
mkEnableOption "a deployed machine"
|
||||
// {
|
||||
default = true;
|
||||
};
|
||||
online = let
|
||||
proxmoxNodeAccess = systems.${config.proxmox.node.name}.config.access;
|
||||
in {
|
||||
enable =
|
||||
mkEnableOption "a deployed machine"
|
||||
// {
|
||||
default = true;
|
||||
};
|
||||
available =
|
||||
mkEnableOption "always on machine"
|
||||
// {
|
||||
default = cfg.online.enable && (config.type == "NixOS" || config.proxmox.node.enable || (config.proxmox.vm.enable && proxmoxNodeAccess.online.available));
|
||||
};
|
||||
};
|
||||
hostnameForNetwork = mkOption {
|
||||
type = attrsOf str;
|
||||
default = {};
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ in
|
|||
enable =
|
||||
mkEnableOption "health check alerts"
|
||||
// {
|
||||
default = config.access.online.enable && config.type == "NixOS";
|
||||
default = config.access.online.enable && config.access.online.available;
|
||||
};
|
||||
};
|
||||
services = mkOption {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue