1
0
Fork 0
nixos-config/common/default.nix

68 lines
1.4 KiB
Nix
Raw Normal View History

2018-06-09 00:41:23 +00:00
{ config, pkgs, lib, ... }:
2018-06-09 00:41:23 +00:00
with lib;
2018-06-09 00:41:23 +00:00
{
2019-07-31 21:56:52 +00:00
imports = [ ./secret ];
2019-07-31 21:56:52 +00:00
config = {
m-0.monitoring = [{
host = "apollo:9100";
name = "apollo";
}];
};
2019-07-31 21:56:52 +00:00
options = {
m-0.private = mkOption {
default = { };
type = types.attrs;
};
m-0.prefix = mkOption {
default = "2a02:c207:3002:7584";
type = types.str;
};
m-0.monitoring = mkOption {
type = types.listOf (types.submodule {
options = {
name = mkOption { type = types.str; };
host = mkOption { type = types.str; };
2019-03-07 22:59:21 +00:00
};
2019-07-31 21:56:52 +00:00
});
default = [ ];
};
m-0.hosts = mkOption {
type = types.attrs;
default = let
p = config.m-0.prefix;
hera-p = "${p}::3";
apollo-p = "${p}::1";
wg-p = "${p}::100";
v4-p = "10.0.0";
in rec {
hera = "${p}::1";
2019-02-24 23:31:53 +00:00
2019-07-31 21:56:52 +00:00
hera-v4 = "213.136.94.190";
2019-02-24 23:31:53 +00:00
2019-07-31 21:56:52 +00:00
hera-wg = "${wg-p}:1";
apollo-wg = "${wg-p}:2";
2019-07-31 21:56:52 +00:00
hera-intern = "${hera-p}:1";
git = "${hera-p}:2";
borg = "${hera-p}:3";
matrix = "${hera-p}:8";
cloud = "${hera-p}:9";
2019-08-07 21:40:26 +00:00
chor-cloud = "${hera-p}:b";
2019-07-31 21:56:52 +00:00
apollo = apollo-wg;
2019-02-24 23:31:53 +00:00
2019-07-31 21:56:52 +00:00
hera-intern-v4 = "${v4-p}.1";
cloud-intern-v4 = "${v4-p}.2";
2019-08-07 21:40:26 +00:00
chor-cloud-intern-v4 = "${v4-p}.3";
2019-07-31 21:56:52 +00:00
matrix-intern-v4 = "${v4-p}.4";
};
2018-06-09 00:41:23 +00:00
};
};
2018-06-09 00:41:23 +00:00
}