diff --git a/deployment/check/data-model-ssh/data-model.nix b/deployment/check/data-model-ssh/data-model.nix index 9245d7d1..d3df53bf 100644 --- a/deployment/check/data-model-ssh/data-model.nix +++ b/deployment/check/data-model-ssh/data-model.nix @@ -5,7 +5,6 @@ ... }@args: let - self = "deployment/check/data-model-ssh/data-model.nix"; inherit (sources) nixpkgs; pkgs = import nixpkgs { inherit system; }; inherit (pkgs) lib; @@ -40,7 +39,7 @@ in key-file = null; inherit sshOpts; }; - module = self; + caller = "deployment/check/data-model-ssh/data-model.nix"; inherit args deployment-name; root-path = pathToRoot; }; diff --git a/deployment/check/data-model-tf/data-model.nix b/deployment/check/data-model-tf/data-model.nix index 5b33d835..a765fdc1 100644 --- a/deployment/check/data-model-tf/data-model.nix +++ b/deployment/check/data-model-tf/data-model.nix @@ -5,7 +5,6 @@ ... }@args: let - self = "deployment/check/data-model-tf/data-model.nix"; inherit (sources) nixpkgs; pkgs = import nixpkgs { inherit system; }; inherit (pkgs) lib; @@ -40,7 +39,7 @@ in key-file = null; inherit sshOpts; }; - module = self; + caller = "deployment/check/data-model-tf/data-model.nix"; inherit args deployment-name httpBackend; root-path = pathToRoot; }; diff --git a/deployment/data-model.nix b/deployment/data-model.nix index 3cc489f8..93295d51 100644 --- a/deployment/data-model.nix +++ b/deployment/data-model.nix @@ -30,13 +30,13 @@ let writeConfig = { system, - module, + caller, root-path, deployment-type, deployment-name, args, }: - # having a `module` location and (serializable) `args`, we know + # having a `caller` location and (serializable) `args`, we know # enough to call it again to extract different info elsewhere later. # we use this to make a deployment script using the desired nixos config, # which would otherwise not be serializable, while nix also makes it hard to @@ -46,7 +46,7 @@ let pkgs.writers.writeText "configuration.nix" '' import ${root-path}/deployment/nixos.nix { system = "${system}"; - configuration = (import "${root-path}/${module}" (builtins.fromJSON "${ + configuration = (import "${root-path}/${caller}" (builtins.fromJSON "${ lib.replaceStrings [ "\"" ] [ "\\\"" ] (lib.strings.toJSON args) }")).${deployment-name}.${deployment-type}.nixos-configuration; } @@ -121,8 +121,8 @@ let }; inherit nixos-configuration; ssh = host-ssh; - module = mkOption { - description = "The module to call to obtain the NixOS configuration from."; + caller = mkOption { + description = "The calling module to obtain the NixOS configuration from."; type = types.str; }; args = mkOption { @@ -147,7 +147,7 @@ let inherit (ssh-host.config) system ssh - module + caller args deployment-name root-path @@ -168,7 +168,7 @@ let nixos_conf = writeConfig { inherit system - module + caller args deployment-name root-path @@ -204,8 +204,8 @@ let }; inherit nixos-configuration; ssh = host-ssh; - module = mkOption { - description = "The module to call to obtain the NixOS configuration from."; + caller = mkOption { + description = "The calling module to obtain the NixOS configuration from."; type = types.str; }; args = mkOption { @@ -233,7 +233,7 @@ let inherit (tf-host.config) system ssh - module + caller args deployment-name root-path @@ -255,7 +255,7 @@ let nixos_conf = writeConfig { inherit system - module + caller args deployment-name root-path