nix-configs

Personal NixOS and home-manager configuration files
Log | Files | Refs

taggart.nix (721B)


      1 { config, pkgs, username, ... }:
      2 
      3 {
      4   # Systemd service
      5   systemd.services.taggart = {
      6     description = "Taggart Go Application";
      7     wantedBy = [ "multi-user.target" ];
      8     after = [ "network.target" ];
      9 
     10     serviceConfig = {
     11       Type = "simple";
     12       User = "${username}";
     13       WorkingDirectory = "/home/${username}/vault/src/taggart";
     14       ExecStart = "${pkgs.go}/bin/go run .";
     15       Restart = "on-failure";
     16       RestartSec = "5s";
     17     };
     18 
     19     environment = {
     20       HOME = "/home/${username}";
     21       GOPATH = "/home/${username}/go";
     22     };
     23 
     24     path = with pkgs; [
     25       ffmpeg
     26       gcc
     27       git
     28       go
     29       yt-dlp
     30     ];
     31 
     32   };
     33 
     34   # Open firewall port
     35   networking.firewall.allowedTCPPorts = [ 8080 ];
     36 
     37 }