mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat: add minio+cockroachdb
This commit is contained in:
parent
bdd402ffeb
commit
2d615951a2
11 changed files with 121 additions and 12 deletions
|
|
@ -21,6 +21,7 @@
|
|||
services.vaultwarden
|
||||
services.weechat
|
||||
services.znc
|
||||
services.cockroachdb
|
||||
];
|
||||
|
||||
nixfiles.oci = {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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 = [
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue