mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-09-11 16:45:28 +03:00
Merge #76
76: nixos-rebuild: allow to change deploy user r=Lassulus a=Mic92 Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
This commit is contained in:
commit
b7e335a5f8
@ -10,10 +10,14 @@ module "partitioner-build" {
|
||||
file = var.file
|
||||
}
|
||||
|
||||
locals {
|
||||
install_user = var.install_user == null ? var.target_user : var.install_user
|
||||
}
|
||||
|
||||
module "install" {
|
||||
source = "../install"
|
||||
kexec_tarball_url = var.kexec_tarball_url
|
||||
target_user = var.target_user
|
||||
target_user = local.install_user
|
||||
target_host = var.target_host
|
||||
target_port = var.target_port
|
||||
nixos_partitioner = module.partitioner-build.result.out
|
||||
@ -30,4 +34,5 @@ module "nixos-rebuild" {
|
||||
source = "../nixos-rebuild"
|
||||
nixos_system = module.system-build.result.out
|
||||
target_host = var.target_host
|
||||
target_user = var.target_user
|
||||
}
|
||||
|
@ -27,9 +27,15 @@ variable "target_host" {
|
||||
description = "DNS host to deploy to"
|
||||
}
|
||||
|
||||
variable "install_user" {
|
||||
type = string
|
||||
description = "SSH user used to connect to the target_host, before installing NixOS. If null than the value of `target_host` is used"
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "target_user" {
|
||||
type = string
|
||||
description = "SSH user used to connect to the target_host, before installing NixOS"
|
||||
description = "SSH user used to connect to the target_host after installing NixOS. If install_user is not set than this user is also used before installing."
|
||||
default = "root"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user