From 71b699e3240561a8995e4a809920a22828c742c3 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Tue, 24 Jun 2025 15:09:10 +0200 Subject: [PATCH] add nixos wrapper --- infra/common/nixos/wrapper.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 infra/common/nixos/wrapper.nix diff --git a/infra/common/nixos/wrapper.nix b/infra/common/nixos/wrapper.nix new file mode 100644 index 00000000..49c26a68 --- /dev/null +++ b/infra/common/nixos/wrapper.nix @@ -0,0 +1,27 @@ +{ + system, + configuration, +}: +let + sources = import ../../../npins; + os = import "${sources.nixpkgs}/nixos" { + # os = import { + inherit system configuration; + # system = "${local.system}"; + # configuration = + # ${var.config_nix} // + # # template parameters passed in from TF thru json + # builtins.fromJSON "${replace(jsonencode(var.config_tf), "\"", "\\\"")}" // + # { + # # nix path for debugging + # nix.nixPath = [ "${local.nix_path}" ]; + # }; + }; +in +# info we want to get back out +{ + substituters = builtins.concatStringsSep " " os.config.nix.settings.substituters; + trusted_public_keys = builtins.concatStringsSep " " os.config.nix.settings.trusted-public-keys; + drv_path = os.config.system.build.toplevel.drvPath; + out_path = os.config.system.build.toplevel; +}