Reset from zero

This commit is contained in:
41666 2023-12-11 18:18:41 -05:00
commit 7520235965
46 changed files with 1783 additions and 0 deletions

View file

@ -0,0 +1,3 @@
{
}

View file

@ -0,0 +1,3 @@
{
}

View file

@ -0,0 +1,3 @@
{
pod = import ./pod.nix;
}

59
modules/nixos/pod.nix Normal file
View file

@ -0,0 +1,59 @@
{ pkgs, config, lib, ... }:
let
cfg = config.pods;
podOpts = with lib; {
container = mkOption {
type = types.attrsOf (types.submodule ({ options = podContainerOpts; }));
};
exportPorts = mkOption {
type = types.listOf types.str;
};
routes = mkOption {
type = types.attrsOf (types.submodule ({ options = routeOpts; }));
};
};
podContainerOpts = with lib; {
image = mkOption {
type = types.str;
};
ports = mkOption {
type = types.listOf types.str;
};
environment = mkOption {
type = types.attrsOf types.str;
};
secrets = mkOption {
type = types.attrsOf types.path;
};
volumes = mkOption {
type = types.attrsOf types.str;
};
};
routeOpts = with lib; {
port = mkOption {
type = types.str;
};
};
in {
options.pods = with lib; {
enable = mkEnableOption "Enable pod support";
pods = mkOption {
type = types.attrsOf (types.submodule ({ options = podOpts; }));
};
};
config = lib.mkIf cfg.enable {
}
}