Skip to content

Commit

Permalink
Rename target-dns option to target
Browse files Browse the repository at this point in the history
  • Loading branch information
aciceri committed Sep 25, 2024
1 parent 153d599 commit 2ca6e56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions modules/install-script/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
enable =
mkEnableOption "Create deployment script at `config.system.build.spoInstallScript`."
// {default = config.spo-anywhere.enable or false;};
target-dns = mkOption {
target = mkOption {
type = nullOr str;
default = null;
example = "[email protected]";
Expand Down Expand Up @@ -47,7 +47,7 @@
rm -rf "$tmp_keys"
}
target="${builtins.toString (config.spo-anywhere.install-script.target-dns or "")}"
target="${builtins.toString (config.spo-anywhere.install-script.target or "")}"
# todo: make target optional option
Expand Down Expand Up @@ -99,7 +99,6 @@
# 4. use scp instead
nixos-anywhere \
--debug \
--store-paths ${config.system.build.diskoScript} ${config.system.build.toplevel} \
--kexec ${kexec-installer} \
-i "$ssh_key" \
--copy-host-keys \
Expand Down
5 changes: 2 additions & 3 deletions tests/install-script.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{inputs, ...}: {
config,
pkgs,
...
}: let
Expand Down Expand Up @@ -175,7 +174,7 @@ in {
install-script {
imports = [installing];
config = {
spo-anywhere.install-script.target-dns = "some-invalid-garbage";
spo-anywhere.install-script.target = "some-invalid-garbage";
};
}
);
Expand All @@ -193,7 +192,7 @@ in {
install-script {
imports = [installing];
config = {
spo-anywhere.install-script.target-dns = "root@installed";
spo-anywhere.install-script.target = "root@installed";
};
}
);
Expand Down

0 comments on commit 2ca6e56

Please sign in to comment.