forked from Fediversity/Fediversity
add nixos wrapper
This commit is contained in:
parent
6c2022d064
commit
71b699e324
1 changed files with 27 additions and 0 deletions
27
infra/common/nixos/wrapper.nix
Normal file
27
infra/common/nixos/wrapper.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
system,
|
||||||
|
configuration,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
sources = import ../../../npins;
|
||||||
|
os = import "${sources.nixpkgs}/nixos" {
|
||||||
|
# os = import <nixpkgs/nixos> {
|
||||||
|
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;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue