commit 5dacb091aa86a9d8a6c9fb4f47a9c141afea9870
parent 92bbb81720636c781ace869b5c8d7d28ce62e76f
Author: breadcat <breadcat@users.noreply.github.com>
Date: Wed, 4 Mar 2026 16:14:48 +0000
Add gnocchi server
Diffstat:
2 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/common/roles/gnocchi.nix b/common/roles/gnocchi.nix
@@ -0,0 +1,35 @@
+{ config, pkgs, username, domain, ... }:
+
+{
+ # Systemd service
+ systemd.services.gnocchi = {
+ description = "Gnocchi Go Application";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" ];
+
+ serviceConfig = {
+ Type = "simple";
+ User = "${username}";
+ WorkingDirectory = "/home/${username}/vault/src/gnocchi";
+ ExecStart = "${pkgs.go}/bin/go run . -f /home/${username}/vault/src/blog.${domain}/content/weight.md -p 9090";
+ Restart = "on-failure";
+ RestartSec = "5s";
+ };
+
+ environment = {
+ HOME = "/home/${username}";
+ GOPATH = "/home/${username}/go";
+ };
+
+ path = with pkgs; [
+ ffmpeg
+ gcc
+ go
+ ];
+
+ };
+
+ # Open firewall port
+ networking.firewall.allowedTCPPorts = [ 9090 ];
+
+}
diff --git a/machines/ilias.nix b/machines/ilias.nix
@@ -15,6 +15,7 @@ let machine = "ilias"; in {
../common/mount-drives.nix
../common/networking.nix
../common/packages.nix
+ ../common/roles/gnocchi.nix
../common/roles/navidrome.nix
../common/roles/nfs-server.nix
../common/roles/stromboli.nix