nix-configs

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

tagliatelle.nix (767B)


      1 { config, pkgs, vars, ... }:
      2 
      3 {
      4   # Systemd service
      5   systemd.services.tagliatelle = {
      6     description = "Tagliatelle 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/tagliatelle";
     14       ExecStart = "${pkgs.go}/bin/go run . -d /tank/.x/tagliatelle -p 9816";
     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 git go yt-dlp ];
     25 
     26   };
     27 
     28   # Open firewall port
     29   networking.firewall.allowedTCPPorts = [ 9816 ];
     30 
     31 }