{"id":18929131,"url":"https://github.com/jwillikers/tailscale-online-target","last_synced_at":"2025-04-15T14:31:59.239Z","repository":{"id":221897853,"uuid":"755667187","full_name":"jwillikers/tailscale-online-target","owner":"jwillikers","description":"A systemd network-online.target for Tailscale","archived":true,"fork":false,"pushed_at":"2024-10-02T11:53:17.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T21:52:14.842Z","etag":null,"topics":["network","nushell","online","systemd","tailscale"],"latest_commit_sha":null,"homepage":"https://codeberg.org/jwillikers/tailscale-online-target","language":"Nushell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwillikers.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.adoc","code_of_conduct":"CODE_OF_CONDUCT.adoc","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-10T19:43:14.000Z","updated_at":"2024-10-02T11:54:56.000Z","dependencies_parsed_at":"2024-02-10T22:30:49.907Z","dependency_job_id":"6d33f78e-f9ad-41b4-a40b-09fb0e581b18","html_url":"https://github.com/jwillikers/tailscale-online-target","commit_stats":null,"previous_names":["jwillikers/tailscale-online-target"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwillikers%2Ftailscale-online-target","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwillikers%2Ftailscale-online-target/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwillikers%2Ftailscale-online-target/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwillikers%2Ftailscale-online-target/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwillikers","download_url":"https://codeload.github.com/jwillikers/tailscale-online-target/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249088897,"owners_count":21210879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["network","nushell","online","systemd","tailscale"],"created_at":"2024-11-08T11:30:14.106Z","updated_at":"2025-04-15T14:31:58.977Z","avatar_url":"https://github.com/jwillikers.png","language":"Nushell","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Tailscale Online Target\nJordan Williams \u003cjordan@jwillikers.com\u003e\n:experimental:\n:icons: font\n:keywords: network nushell online systemd tailscale target\nifdef::env-github[]\n:tip-caption: :bulb:\n:note-caption: :information_source:\n:important-caption: :heavy_exclamation_mark:\n:caution-caption: :fire:\n:warning-caption: :warning:\nendif::[]\n:just: https://github.com/casey/just[just]\n:Nushell: http://www.nushell.sh/[Nushell]\n:nushell-version: 0.94.2\n:systemd: https://systemd.io/[systemd]\n:Tailscale: https://tailscale.com/[Tailscale]\n\nThe Tailscale Online Target is a {systemd} `network-online.target` for {Tailscale}.\nThis makes it possible to add systemd dependencies on the Tailscale network.\nThis is based off of the post https://forum.tailscale.com/t/mount-share-only-if-connected-to-tailscale/3027/6[Mount share only if connected to Tailscale] from the Tailscale Forum.\nI've ported over the script to use Nushell and made it possible to add dependencies on specific devices being available on the Tailscale network.\n\n== Install\n\nThese are the steps to install Tailscale, Nushell, and the Tailscale Online Target.\nThese instructions are intended for Debian and Fedora Atomic systems.\n\n. Install {just} by following the instructions in the https://github.com/casey/just?tab=readme-ov-file#installation[installation section].\n\n. Clone the repository.\n+\n[,sh]\n----\ngit clone https://codeberg.org/jwillikers/tailscale-online-target.git\n----\n\n. Change to the repository's directory.\n+\n[,sh]\n----\ncd tailscale-online-target\n----\n\n. Install everything by running `just install`.\n+\n[,sh]\n----\njust install\n----\n\n. Bring Tailscale online.\nI use an exit node to route all traffic through Tailscale.\nModify or omit the `--exit-node` flag as necessary.\n+\n[,sh]\n----\nsudo tailscale up --exit-node=fd7a:115c:a1e0:ab12:4843:cd96:625f:e80c\n----\n\n. Start the desired system timers.\nHere I start the global timer as well as a timer for a specific instance.\n+\nSystem::\n+\n[,sh]\n----\nsudo systemctl enable --now tailscale-dispatcher.timer tailscale-dispatcher@meerkat.timer\n----\n\nUser::\n+\n[,sh]\n----\nsystemctl --user enable --now tailscale-dispatcher.timer tailscale-dispatcher@meerkat.timer\n----\n\n. Add a dependency on the specific `tailscale-online.target` as necessary for any systemd units.\n\n=== Dependent Filesystems\n\nAdding a dependency for filesystems is a bit more complicated than a regular systemd unit.\nThe instructions here describe how to do add a dependency on the Tailscale Online Target for a filesystem, such as an NFS mount.\n\nfstab:: In `/etc/fstab`, use the `x-systemd.requires` mount option to specify the dependency as in the following example.\n+\n./etc/fstab\n[source]\n----\nnfs.jwillikers.io:/container-volumes /var/home/core/container-volumes nfs defaults,_netdev,context=\"system_u:object_r:container_file_t:s0\",noatime,nodev,noexec,nofail,nosuid,soft,user,x-systemd.automount,x-systemd.idle-timeout=5min,x-systemd.mount-timeout=30s,x-systemd.requires=tailscale-online@rockpro64.target 0 0\n----\n\nmount units:: Add the dependency manually to systemd mount and automount units.\n+\n--\n[,sh]\n----\nsudo systemctl edit var-home-core-Media.mount\n----\n\n./etc/systemd/system/var-home-core-Media.mount.d/override.conf\n[,systemd]\n----\n[Unit]\nAfter=tailscale-online@rockpro64.target\nRequires=tailscale-online@rockpro64.target\n----\n\n[,sh]\n----\nsudo systemctl edit var-home-core-Media.automount\n----\n\n./etc/systemd/system/var-home-core-Media.automount.d/override.conf\n[,systemd]\n----\n[Unit]\nAfter=tailscale-online@rockpro64.target\nRequires=tailscale-online@rockpro64.target\n----\n--\n\n== References\n\n* https://systemd.io/NETWORK_ONLINE/[systemd: Network Configuration Synchronization Points]\n\n== Code of Conduct\n\nThe project's Code of Conduct is available in the link:CODE_OF_CONDUCT.adoc[Code of Conduct] file.\n\n== License\n\nThis repository is licensed under the https://www.gnu.org/licenses/gpl-3.0.html[GPLv3].\nPlease refer to the bundled link:LICENSE.adoc[license].\n\n© 2024 Jordan Williams\n\n== Authors\n\nmailto:{email}[{author}]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwillikers%2Ftailscale-online-target","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwillikers%2Ftailscale-online-target","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwillikers%2Ftailscale-online-target/lists"}