container builder

This commit is contained in:
soraefir
2026-05-06 23:28:49 +02:00
parent 1c0cfd1afe
commit 093497367a
3 changed files with 66 additions and 44 deletions

View File

@@ -1,9 +1,10 @@
{ config, pkgs, lib, ... }:
let
mkContainer = import ./mkContainer.nix { inherit config lib serverCfg; };
cfg = config.syscfg.server.containers;
enabledConfigs = lib.filterAttrs (name: c: c.enable) cfg;
containerSetsList = lib.mapAttrsToList (name: containerCfg:
let defs = import (./defs + "/${name}.nix") {inherit config pkgs lib containerCfg;};
let defs = import (./defs + "/${name}.nix") {inherit config pkgs lib containerCfg mkContainer;};
in{
containers = lib.mapAttrs' (cName: cValue:
lib.nameValuePair "${name}-${cName}" cValue