Fix attempt
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
{ config, lib, serverCfg }:
|
{ config, lib, serverCfg }:
|
||||||
{ image, secret ? ""
|
let builder =
|
||||||
, subdomain ? "", ip ? "", port ? 0
|
{ image, secret ? ""
|
||||||
, extraEnv ? { }, extraLabels ? { }
|
, subdomain ? "", ip ? "", port ? 0
|
||||||
, overrides ? { }
|
, extraEnv ? { }, extraLabels ? { }
|
||||||
}:
|
, overrides ? { }
|
||||||
let base = {
|
}:
|
||||||
|
let base = {
|
||||||
inherit image;
|
inherit image;
|
||||||
|
|
||||||
environmentFiles = if secret !="" then [ config.sops.secrets."${lib.toUpper secret}".path ] else [];
|
environmentFiles = if secret !="" then [ config.sops.secrets."${lib.toUpper secret}".path ] else [];
|
||||||
@@ -24,5 +25,6 @@ let base = {
|
|||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--add-host=host.containers.internal:host-gateway"
|
"--add-host=host.containers.internal:host-gateway"
|
||||||
] ++ lib.optional (ip != "") "--ip=${ip}";
|
] ++ lib.optional (ip != "") "--ip=${ip}";
|
||||||
};
|
};
|
||||||
in lib.recursiveUpdate base overrides // { host = "host.containers.internal"; }
|
in lib.recursiveUpdate base overrides;
|
||||||
|
in builder // { host = "host.containers.internal"; }
|
||||||
Reference in New Issue
Block a user