commit 5ddf2ac2dc334a47df61c275a95e7757a8961ee5
parent adacc0b1dc35ebc5387b2525f6a31e2063465368
Author: breadcat <breadcat@users.noreply.github.com>
Date: Mon, 5 Jan 2026 14:07:06 +0000
Systemd service instead of tmux window
Diffstat:
3 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/common/devel.nix b/common/devel.nix
@@ -13,5 +13,4 @@
# web
hugo
];
- # networking.firewall.allowedTCPPorts = [ 8080 ]; # nixos-firewall-tool open tcp 8080
}
diff --git a/common/taggart.nix b/common/taggart.nix
@@ -0,0 +1,31 @@
+{ config, pkgs, username, ... }:
+
+{
+ # Systemd service
+ systemd.services.taggart = {
+ description = "Taggart Go Application";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" ];
+
+ serviceConfig = {
+ Type = "simple";
+ User = "${username}";
+ WorkingDirectory = "/home/${username}/vault/src/taggart";
+ ExecStart = "${pkgs.go}/bin/go run .";
+ Restart = "on-failure";
+ RestartSec = "5s";
+ };
+
+ environment = {
+ HOME = "/home/${username}";
+ # PATH = "${pkgs.go}/bin:${pkgs.git}/bin:/run/current-system/sw/bin";
+ GOPATH = "/home/${username}/go";
+ };
+
+ path = [ pkgs.go pkgs.git pkgs.gcc ];
+ };
+
+ # Open firewall port
+ networking.firewall.allowedTCPPorts = [ 8080 ];
+
+}
diff --git a/machines/ilias.nix b/machines/ilias.nix
@@ -13,6 +13,7 @@ let machine = "ilias"; in {
../common/locale.nix
../common/mount-drives.nix
../common/networking.nix
+ ../common/taggart.nix
../common/nfs-server.nix
../common/packages.nix
../common/ssh.nix