diff --git a/README.md b/README.md index 14e1829..8e399c5 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,5 @@ -# nix-docker +# [Grafana Loki](https://grafana.com/docs/loki/latest/) -Template for making Nix-based LXC containers in Proxmox to run Docker +## [Loki NixOS Options](https://search.nixos.org/options?sort=relevance&type=packages&query=services.loki) -## NFS Mounts - -Needs to be done in a privileged container because AppArmor makes it a pain in the ass - -- [Unprivileged LXC containers](https://pve.proxmox.com/wiki/Unprivileged_LXC_containers) -- [Mount NFS inside LXC containers](https://theorangeone.net/posts/mount-nfs-inside-lxc/) -- [How to allow specific Proxmox LXC containers to mount NFS shares on the network?](https://unix.stackexchange.com/questions/450308/how-to-allow-specific-proxmox-lxc-containers-to-mount-nfs-shares-on-the-network) - -## Docker - -- [Docker on NixOS](https://nixos.wiki/wiki/Docker) \ No newline at end of file +## [Loki Configuration Examples](https://grafana.com/docs/loki/latest/configure/examples/configuration-examples/) \ No newline at end of file diff --git a/loki.nix b/loki.nix index 4ec6fea..f81e60d 100644 --- a/loki.nix +++ b/loki.nix @@ -1,9 +1,13 @@ { pkgs, userName, ... }: +let + lokiPort = 3100; +in { - networking.firewall.allowedTCPPorts = [ 3100 ]; + networking.firewall.allowedTCPPorts = [ lokiPort ]; environment.systemPackages = with pkgs; [ - (pkgs.writeShellScriptBin "loki-check" "curl http://127.0.0.1:3100/ready") + (pkgs.writeShellScriptBin "loki-check" "curl http://localhost:3100/ready") + (pkgs.writeShellScriptBin "loki-logs" "journalctl -b -u loki.service -n 25") ]; services.loki = { @@ -11,8 +15,8 @@ user = "${userName}"; configuration = { - server.http_listen_port = 3100; - server.grpc_listen_port = 9096; + server.http_listen_port = lokiPort; + # server.grpc_listen_port = 9096; auth_enabled = false; ingester = {