Skip to content

Commit 6d0e923

Browse files
bors[bot]Mic92
andauthored
Merge #75
75: nixos-rebuild: allow to change deploy user r=Lassulus a=Mic92 Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2 parents 63b9af6 + c2f70ed commit 6d0e923

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

terraform/nixos-rebuild/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ resource "null_resource" "nixos-rebuild" {
33
store_path = var.nixos_system
44
}
55
provisioner "local-exec" {
6-
command = "${path.module}/deploy.sh ${var.nixos_system} root@${var.target_host} ${var.target_port}"
6+
command = "${path.module}/deploy.sh ${var.nixos_system} ${var.target_user}@${var.target_host} ${var.target_port}"
77
}
88
}

terraform/nixos-rebuild/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ variable "target_host" {
88
description = "DNS host to deploy to"
99
}
1010

11+
variable "target_user" {
12+
type = string
13+
default = "root"
14+
description = "User to deploy as"
15+
}
16+
1117
variable "target_port" {
1218
type = number
1319
description = "SSH port used to connect to the target_host"

0 commit comments

Comments
 (0)