change podman building
This commit is contained in:
@@ -3,10 +3,13 @@ let
|
|||||||
cfg = config.syscfg.server.containers;
|
cfg = config.syscfg.server.containers;
|
||||||
enabledConfigs = lib.filterAttrs (name: c: c.enable) cfg;
|
enabledConfigs = lib.filterAttrs (name: c: c.enable) cfg;
|
||||||
containerSetsList = lib.mapAttrsToList (name: containerCfg:
|
containerSetsList = lib.mapAttrsToList (name: containerCfg:
|
||||||
import (./defs + "/${name}.nix") {
|
let defs = import (./defs + "/${name}.nix") {inherit config pkgs lib containerCfg;};
|
||||||
inherit config pkgs lib containerCfg;
|
in{
|
||||||
}
|
containers = lib.mapAttrs' (cName: cValue:
|
||||||
) enabledConfigs;
|
lib.nameValuePair "${name}-${cName}" cValue
|
||||||
|
) defs.containers;
|
||||||
|
}
|
||||||
|
) enabledConfigs;
|
||||||
mergedContainers = lib.attrsets.mergeAttrsList (lib.map(e: e.containers) containerSetsList);
|
mergedContainers = lib.attrsets.mergeAttrsList (lib.map(e: e.containers) containerSetsList);
|
||||||
allPathConfigs = lib.flatten (lib.map (e: e.paths or []) containerSetsList);
|
allPathConfigs = lib.flatten (lib.map (e: e.paths or []) containerSetsList);
|
||||||
in
|
in
|
||||||
|
|||||||
@@ -14,9 +14,8 @@ in {
|
|||||||
|
|
||||||
containers = {
|
containers = {
|
||||||
|
|
||||||
auth_server = {
|
server = {
|
||||||
image = "ghcr.io/goauthentik/server:latest";
|
image = "ghcr.io/goauthentik/server:latest";
|
||||||
hostname = "auth_server";
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"${serverCfg.dataPath}/authentik/media:/media"
|
"${serverCfg.dataPath}/authentik/media:/media"
|
||||||
"${serverCfg.dataPath}/authentik/templates:/templates"
|
"${serverCfg.dataPath}/authentik/templates:/templates"
|
||||||
@@ -47,8 +46,6 @@ in {
|
|||||||
cmd = [ "server" ];
|
cmd = [ "server" ];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--add-host=host.containers.internal:host-gateway"
|
"--add-host=host.containers.internal:host-gateway"
|
||||||
"--replace"
|
|
||||||
"--rm"
|
|
||||||
"--ip=${containerCfg.ip}"
|
"--ip=${containerCfg.ip}"
|
||||||
];
|
];
|
||||||
ports = [
|
ports = [
|
||||||
@@ -56,9 +53,8 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
auth_worker = {
|
worker = {
|
||||||
image = "ghcr.io/goauthentik/server:latest";
|
image = "ghcr.io/goauthentik/server:latest";
|
||||||
hostname = "auth_worker";
|
|
||||||
volumes = [
|
volumes = [
|
||||||
"${serverCfg.dataPath}/authentik/media:/media"
|
"${serverCfg.dataPath}/authentik/media:/media"
|
||||||
"${serverCfg.dataPath}/authentik/templates:/templates"
|
"${serverCfg.dataPath}/authentik/templates:/templates"
|
||||||
@@ -75,8 +71,6 @@ in {
|
|||||||
};
|
};
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--add-host=host.containers.internal:host-gateway"
|
"--add-host=host.containers.internal:host-gateway"
|
||||||
"--replace"
|
|
||||||
"--rm"
|
|
||||||
];
|
];
|
||||||
cmd = [ "worker" ];
|
cmd = [ "worker" ];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user