DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

429a72accdc4b0674002dd48eaf44439a654cca6 — Jonni Liljamo 2 months ago 45db542
chore: tamma things

* rest of hosts
 * no default actions
 * add actions via tailscale
1 files changed, 24 insertions(+), 3 deletions(-)

M tamma.yaml
M tamma.yaml => tamma.yaml +24 -3
@@ 1,19 1,40 @@
# TODO: Somehow auto-generate this via Nix? Since all the hosts are defined there.

# FIXME: This is currently backwards in tamma, fix there...
#        Or just remove default actions completely
default_actions: true

# NOTE: .A.host.Name should match the hostname of the machine, which in turn
#       should match the hostname of the machine in my tailnet
hosts:
  - name: alderaan
    ip: alderaan
    data:
      user: root
  - name: auth
    data:
      user: root
  - name: cloud
    ip: cloud
    data:
      user: root
  - name: dns
    data:
      user: root
  - name: metrics
    data:
      user: root
  - name: proxy
    data:
      user: root
  - name: social
    ip: social
    data:
      user: root

actions:
  - name: ssh (tailscale)
    exectemplate: ssh {{ .A.host.Data.user }}@{{ .A.host.Name }}
  - name: remote rebuild switch (tailscale)
    exectemplate: nixos-rebuild switch --flake ".#{{ .A.host.Name }}" --target-host {{ .A.host.Data.user }}@{{ .A.host.Name }}
  - name: remote rebuild dry-activate (tailscale)
    exectemplate: nixos-rebuild dry-activate --flake ".#{{ .A.host.Name }}" --target-host {{ .A.host.Data.user }}@{{ .A.host.Name }}
  - name: edit secrets
    exectemplate: sops secrets/{{ .A.host.Name }}/secrets.yaml