feat: add minio+cockroachdb

This commit is contained in:
Kat Inskip 2022-10-06 09:06:17 -07:00
parent bdd402ffeb
commit 2d615951a2
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
11 changed files with 121 additions and 12 deletions

View file

@ -21,6 +21,7 @@
services.vaultwarden
services.weechat
services.znc
services.cockroachdb
];
nixfiles.oci = {

View file

@ -6,8 +6,11 @@
services.nginx
services.access
services.irlsite
services.cockroachdb
];
services.cockroachdb.locality = "provider=buyvm,region=luxembourg,host=${config.networking.hostName}";
boot = {
loader.grub = {
enable = true;

View file

@ -28,10 +28,36 @@
group = "hass";
};
secrets.variables.latitude = {
path = "secrets/home-assistant";
field = "latitude";
};
secrets.variables.longitude = {
path = "secrets/home-assistant";
field = "longitude";
};
secrets.variables.elevation = {
path = "secrets/home-assistant";
field = "elevation";
};
secrets.files.home-assistant-secrets = {
text = builtins.toJSON {
latitude = tf.variables.latitude.ref;
longitude = tf.variables.longitude.ref;
elevation = tf.variables.elevation.ref;
};
owner = "hass";
group = "hass";
};
systemd.services.home-assistant = {
preStart = lib.mkBefore ''
rm ${config.services.home-assistant.configDir}/integration.json
cp --no-preserve=mode ${config.secrets.files.ha-integration.path} ${config.services.home-assistant.configDir}/integration.json
cp --no-preserve=mode ${config.secrets.files.home-assistant-secrets.path} ${config.services.home-assistant.configDir}/secrets.yaml
cp --no-preserve=mode ${config.secrets.files.ha-integration.path} ${config.services.home-assistant.configDir}/integration.yaml
'';
};
@ -41,6 +67,11 @@
homeassistant = {
name = "Gensokyo";
unit_system = "metric";
latitude = "!secret latitude";
longitude = "!secret longitude";
elevation = "!secret elevation";
currency = "CAD";
time_zone = "America/Vancouver";
external_url = "https://home.gensokyo.zone";
};
frontend = {
@ -93,7 +124,7 @@
};
google_assistant = {
project_id = "gensokyo-5cfaf";
service_account = "!include integration.json";
service_account = "!include integration.yaml";
};
homekit = {
name = "Tewi";

View file

@ -5,6 +5,7 @@
(modulesPath + "/installer/scan/not-detected.nix")
hardware.local
nixos.network
services.cockroachdb
./kanidm.nix
./vouch.nix
./home-assistant.nix
@ -14,6 +15,8 @@
./nginx.nix
];
services.cockroachdb.locality = "provider=local,network=gensokyo,host=${config.networking.hostName}";
networks = {
gensokyo = {
interfaces = [

View file

@ -12,8 +12,11 @@
services.tvheadend
services.zfs
services.plex
services.cockroachdb
];
services.cockroachdb.locality = "provider=local,network=chitei,host=${config.networking.hostName}";
boot.supportedFilesystems = singleton "zfs";
fileSystems = {