mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
feat: trying out grocy
This commit is contained in:
parent
a7e35fbc88
commit
c27a8da537
5 changed files with 34 additions and 2 deletions
23
nixos/grocy.nix
Normal file
23
nixos/grocy.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{config, lib, ...}: let
|
||||
inherit (lib.modules) mkDefault;
|
||||
in {
|
||||
config = {
|
||||
services.grocy = {
|
||||
enable = mkDefault true;
|
||||
hostName = "grocy";
|
||||
nginx.enableSSL = false;
|
||||
settings = {
|
||||
currency = mkDefault "CAD";
|
||||
};
|
||||
};
|
||||
services.nginx = let
|
||||
name.shortServer = mkDefault "grocy";
|
||||
in {
|
||||
virtualHosts = {
|
||||
grocy = {
|
||||
inherit name;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
inherit (lib.attrsets) listToAttrs nameValuePair;
|
||||
inherit (access) nixosFor;
|
||||
inherit (config.networking) hostName;
|
||||
inherit (config.services) nginx;
|
||||
cfg = config.services.cloudflared;
|
||||
apartment = "5e85d878-c6b2-4b15-b803-9aeb63d63543";
|
||||
accessHostFor = {
|
||||
|
|
@ -49,11 +50,15 @@ in {
|
|||
default = "http_status:404";
|
||||
ingress = listToAttrs [
|
||||
(ingressForNginx {
|
||||
host = config.services.zigbee2mqtt.domain;
|
||||
host = nginx.virtualHosts.zigbee2mqtt.serverName;
|
||||
inherit hostName;
|
||||
})
|
||||
(ingressForNginx {
|
||||
host = config.services.nginx.access.unifi.domain;
|
||||
host = nginx.access.unifi.domain;
|
||||
inherit hostName;
|
||||
})
|
||||
(ingressForNginx {
|
||||
host = nginx.virtualHosts.grocy.serverName;
|
||||
inherit hostName;
|
||||
})
|
||||
(ingressForHass {inherit hostName;})
|
||||
|
|
|
|||
|
|
@ -23,12 +23,14 @@ in {
|
|||
nixos.home-assistant
|
||||
nixos.zigbee2mqtt
|
||||
nixos.syncplay
|
||||
nixos.grocy
|
||||
./cloudflared.nix
|
||||
];
|
||||
|
||||
services.nginx = {
|
||||
virtualHosts = {
|
||||
zigbee2mqtt.proxied.enable = "cloudflared";
|
||||
grocy.proxied.enable = "cloudflared";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ module "hakurei_system_records" {
|
|||
"smb",
|
||||
"kitchen",
|
||||
"home",
|
||||
"grocy",
|
||||
"yt",
|
||||
]
|
||||
global_subdomains = [
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ module "tewi" {
|
|||
"id",
|
||||
"z2m",
|
||||
"unifi",
|
||||
"grocy",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue