diff --git a/tailscale/README.md b/tailscale/README.md index c5bf2d3..e1a2a2b 100644 --- a/tailscale/README.md +++ b/tailscale/README.md @@ -34,9 +34,6 @@ The tailscaled service is disabled and amked in the template. ## Qube creation `create.sls` is a standard way of creating `sys-tailscale` - qvm.present is used to create the qube, and preferences and features are set. -Note the use of an include statement at the head of the file. This allows a single state execution to call other states. - - ## Qube configuratioon ``` sudo qubesctl --skip-dom0 --targets=sys-tailscale state.apply tailscale.configure @@ -44,3 +41,12 @@ sudo qubesctl --skip-dom0 --targets=sys-tailscale state.apply tailscale.configur Changes to `/rw/config/rc.local` are written using `file.append` to start tailscaled and bring up Tailscale. To make sure that configuration changes are kept after a qubes restart, [bind-dirs](https://www.qubes-os.org/doc/bind-dirs/) is used. The configuration file is created using `file.managed` + +## Installing to existing templates, and existing qubes. + +You can add Tailscale to an existing template: +`sudo qubesctl --skip-dom0 --show-output --targets=TEMPLATE_NAME state.apply tailscale.install` + +You can add the service to an existing qube, where Tailscale is installed in the base template: +`sudo qubesctl --skip-dom0 --show-output --targets=QUBE_NAME state.apply tailscale.configure` +If the qube is running, restart it after configuration is complete. diff --git a/tailscale/repo.sls b/tailscale/repo.sls deleted file mode 100644 index 31e3162..0000000 --- a/tailscale/repo.sls +++ /dev/null @@ -1,87 +0,0 @@ -# vim: set syntax=yaml ts=2 sw=2 sts=2 et : -# -# -# - -{% if salt['pillar.get']('update_proxy:caching') %} -{% set proxy = 'cacher' %} -{% endif %} - -{% if grains['nodename'] != 'dom0' %} -{% if grains['os_family']|lower == 'debian' %} -{% if grains['nodename']|lower != 'host' %} -{% if proxy == 'cacher' %} -{% for repo in salt['file.find']('/etc/apt/sources.list.d/', name='*list') %} -{{ repo }}_baseurl: - file.replace: - - name: {{ repo }} - - pattern: 'https://' - - repl: 'http://HTTPS///' - - flags: [ 'IGNORECASE', 'MULTILINE' ] - - backup: False - -{% endfor %} - -/etc/apt/sources.list: - file.replace: - - name: /etc/apt/sources.list - - pattern: 'https:' - - repl: 'http://HTTPS/' - - flags: [ 'IGNORECASE', 'MULTILINE' ] - - backup: False - -{% endif %} - -requirements_installed: - pkg.installed: - - refresh: True - - pkgs: - - qubes-core-agent-networking - - qubes-core-agent-passwordless-root - - iproute2 - - libnotify-bin - - lsb-release - - xz-utils - -/etc/apt/sources.list.d/tailscale.list: - file.managed: - - source: - - salt://tailscale/tailscale.list - - user: root - - group: root - - makedirs: True - -/usr/share/keyrings/tailscale-achive-keyring.gpg: - file.managed: - - source: - - salt://tailscale/tailscale-archive-keyring.gpg - - user: root - - group: root - - makedirs: True - -{% if proxy == 'cacher' %} -/etc/apt/sources.list.d/tailscale.list: - file.replace: - - name: /etc/apt/sources.list.d/tailscale.list - - pattern: 'https:' - - repl: 'http://HTTPS/' - - flags: [ 'IGNORECASE', 'MULTILINE' ] - - backup: False - -{% endif %} - -tailscale_installed: - pkg.installed: - - refresh: True - - pkgs: - - tailscale - -{% endif %} - -disable_tailscaled: - service.disabled: - - name: tailscaled - -mask_tailscaled: - service.masked: - - name: tailscaled