try and have packer use nixos-infect thru a flake
This commit is contained in:
parent
daf312eea5
commit
3450cea72a
|
@ -1,6 +1,14 @@
|
|||
{ config, lib, ... }:
|
||||
# { config, lib, inputs, ... }:
|
||||
|
||||
let
|
||||
|
||||
indent = numberOfSpaces: str: let
|
||||
lines = lib.splitString "\n" str;
|
||||
prependSpaces = (x: numberOfSpaces * " " + x);
|
||||
in lib.concatMapStringsSep "\n" prependSpaces lines;
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
packer = {
|
||||
|
@ -66,6 +74,11 @@
|
|||
#cloud-config
|
||||
runcmd:
|
||||
- curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | PROVIDER=hetznercloud NIX_CHANNEL=nixos-''${var.nixos_version} bash 2>&1 | tee /tmp/infect.log
|
||||
# - |
|
||||
export PROVIDER=hetznercloud
|
||||
export NIX_CHANNEL=nixos-''${var.nixos_version}
|
||||
# ${indent 2 (lib.readFile "${inputs.nixos-infect}/nixos-infect")}
|
||||
'';
|
||||
ssh_username = "root";
|
||||
|
||||
snapshot_name = "nixos system disk - \${var.arch} - \${var.nixos_version}";
|
||||
|
|
Loading…
Reference in New Issue