diff options
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/vidhar/default.nix | 30 | ||||
-rw-r--r-- | hosts/vidhar/zfs.nix | 6 |
2 files changed, 36 insertions, 0 deletions
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index 0bb1f680..6002947f 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix | |||
@@ -155,5 +155,35 @@ | |||
155 | sopsFile = ./grafana-secret-key; | 155 | sopsFile = ./grafana-secret-key; |
156 | owner = "grafana"; | 156 | owner = "grafana"; |
157 | }; | 157 | }; |
158 | |||
159 | services.loki = { | ||
160 | enable = true; | ||
161 | configuration = { | ||
162 | auth_enabled = false; | ||
163 | server = { | ||
164 | http_listen_port = 9094; | ||
165 | grpc_listen_port = 9095; | ||
166 | }; | ||
167 | }; | ||
168 | }; | ||
169 | services.promtail = { | ||
170 | enable = true; | ||
171 | configuration = { | ||
172 | server = { | ||
173 | http_listen_port = 9080; | ||
174 | grpc_listen_port = 0; | ||
175 | }; | ||
176 | clients = [ | ||
177 | { url = "http://localhost:9094/loki/api/v1/push"; } | ||
178 | ]; | ||
179 | scrape_configs = [ | ||
180 | { job_name = "system"; | ||
181 | journal = { | ||
182 | json = true; | ||
183 | }; | ||
184 | } | ||
185 | ]; | ||
186 | }; | ||
187 | }; | ||
158 | }; | 188 | }; |
159 | } | 189 | } |
diff --git a/hosts/vidhar/zfs.nix b/hosts/vidhar/zfs.nix index 53ba5120..8c164bbd 100644 --- a/hosts/vidhar/zfs.nix +++ b/hosts/vidhar/zfs.nix | |||
@@ -89,6 +89,12 @@ in { | |||
89 | options = [ "zfsutil" ]; | 89 | options = [ "zfsutil" ]; |
90 | }; | 90 | }; |
91 | 91 | ||
92 | "/var/lib/loki" = | ||
93 | { device = "ssd-raid1/local/var-lib-loki"; | ||
94 | fsType = "zfs"; | ||
95 | options = [ "zfsutil" ]; | ||
96 | }; | ||
97 | |||
92 | "/var/log" = | 98 | "/var/log" = |
93 | { device = "ssd-raid1/local/var-log"; | 99 | { device = "ssd-raid1/local/var-log"; |
94 | fsType = "zfs"; | 100 | fsType = "zfs"; |