nix lib.mapAttrs'

| 17 days ago |
25
|
  1. 1
    systemd.services = lib.mapAttrs' (name: config:
  2. 2
    lib.nameValuePair "tailscale-serve-${name}" {
  3. 3
    description = "tailscale serve - svc:${name}";
  4. 4
    wantedBy = [ "default.target" ];
  5. 5
     
  6. 6
    serviceConfig = {
  7. 7
    Type = "oneshot";
  8. 8
    Restart = "on-failure";
  9. 9
    ExecStart =
  10. 10
    "${pkgs.tailscale}/bin/tailscale serve --service=svc:${name} ${
  11. 11
    toString config.port
  12. 12
    }";
  13. 13
    };
  14. 14
    }) {
  15. 15
    parrhasius = { port = 4567; };
  16. 16
    yarr = { port = 7070; };
  17. 17
    scrutiny = { port = 8053; };
  18. 18
    jellyfin = { port = 8096; };
  19. 19
    influxdb = { port = 8086; };
  20. 20
    grafana = { port = 3000; };
  21. 21
    };