Skip to content

Commit e2c5ef7

Browse files
committed
fix: use git sha based flake url instead of upload
1 parent 8ea093e commit e2c5ef7

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
---
2-
- name: Deploy system manager
2+
- name: Install system-manager from binary cache
33
ansible.builtin.shell: |
44
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
5-
cd /tmp
6-
nix run --accept-flake-config /tmp/flake#system-manager -- switch --flake /tmp/flake 2>&1 | tee /tmp/system-manager-deploy.log
5+
nix profile install --accept-flake-config "github:supabase/postgres/{{ git_commit_sha }}#system-manager"
6+
become: true
7+
8+
- name: Build and activate system-manager config
9+
ansible.builtin.shell: |
10+
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
11+
STORE_PATH=$(nix build --accept-flake-config --no-link --print-out-paths "github:supabase/postgres/{{ git_commit_sha }}#systemConfigs.$(nix eval --raw nixpkgs#system).default")
12+
system-manager register --store-path "$STORE_PATH" --sudo
13+
system-manager activate --store-path "$STORE_PATH" --sudo
714
become: true

stage2-nix-psql.pkr.hcl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,6 @@ build {
120120
destination = "/tmp/ansible-playbook"
121121
}
122122

123-
provisioner "file" {
124-
source = "${abspath(path.root)}"
125-
destination = "/tmp/flake"
126-
}
127-
128123
provisioner "shell" {
129124
environment_vars = [
130125
"GIT_SHA=${var.git_sha}",

0 commit comments

Comments
 (0)