stromboli.nix (675B)
1 { config, pkgs, vars, ... }: 2 3 { 4 # Systemd service 5 systemd.services.stromboli = { 6 description = "Stromboli Go Application"; 7 wantedBy = [ "multi-user.target" ]; 8 after = [ "network.target" ]; 9 10 serviceConfig = { 11 Type = "simple"; 12 User = "${vars.user.username}"; 13 WorkingDirectory = "/home/${vars.user.username}/vault/src/stromboli"; 14 ExecStart = "${pkgs.go}/bin/go run . -d /tank/media/videos/ -p 8080"; 15 Restart = "on-failure"; 16 RestartSec = "5s"; 17 }; 18 19 environment = { 20 HOME = "/home/${vars.user.username}"; 21 GOPATH = "/home/${vars.user.username}/go"; 22 }; 23 24 path = with pkgs; [ ffmpeg gcc go ]; 25 26 }; 27 28 }