chore: format files

This commit is contained in:
technofab 2025-12-18 13:42:14 +01:00
parent 012a3afb2d
commit 471cb8b7b5
Signed by: technofab
SSH key fingerprint: SHA256:bV4h88OqS/AxjbPn66uUdvK9JsgIW4tv3vwJQ8tpMqQ
11 changed files with 48 additions and 54 deletions

4
.gitignore vendored
View file

@ -1,5 +1 @@
.direnv
.devenv
.idea
result
.pre-commit-config.yaml

View file

@ -30,6 +30,7 @@ In GitLab CI this should for example be `JOB-TOKEN: $CI_JOB_TOKEN`.
A personal access token requires this format instead: `PRIVATE-TOKEN: <your token>`.
!!! note
The script only uploads a version once. If the version already exists it will skip that Nixlet.
## General

View file

@ -10,7 +10,7 @@ with lib; rec {
};
modules = [
file
({...}: {
(_: {
# pass through all args to the values.nix module
config =
rawValues
@ -59,12 +59,13 @@ with lib; rec {
eval = {
system,
project ? defaultProject,
overrides ? ({...}: {}),
overrides ? (_: {}),
values ? {},
}:
assert lib.assertMsg (project != null) "No default project set, please pass a project to the render method"; let
nixletArg = baseNixletArg // {inherit project;};
in (kubenix.evalModules.${system} {
in
kubenix.evalModules.${system} {
module = {kubenix, ...}: {
imports = with kubenix.modules; [
k8s
@ -72,7 +73,7 @@ with lib; rec {
docker
files
./secretsModule.nix
({...}: let
(_: let
finalValues = mkValues "${path}/values.nix" {
rawValues = values;
nixlet = nixletArg;
@ -89,11 +90,11 @@ with lib; rec {
];
kubenix.project = project;
};
});
};
render = {
system,
project ? defaultProject,
overrides ? ({...}: {}),
overrides ? (_: {}),
values ? {},
}:
(nixlet.eval {
@ -150,6 +151,6 @@ with lib; rec {
)
);
mkDocs = {nixlet, ...} @ opts:
mkDocs = opts:
import ./valuesDocs.nix (opts // {inherit lib;});
}

View file

@ -31,7 +31,7 @@
optionsNix = builtins.listToAttrs (
map (o: {
name = o.name;
inherit (o) name;
value = removeAttrs o [
"visible"
"internal"
@ -76,8 +76,8 @@
'')
+ "\n";
opts = mapAttrsToList (name: opt:
optToMd opt)
opts =
mapAttrsToList (_name: optToMd)
optionsNix;
markdown = concatStringsSep "\n" opts;
in

View file

@ -10,7 +10,7 @@ with nixlet; {
port = 8080;
}
];
type = values.service.type;
inherit (values.service) type;
};
};
};

View file

@ -7,11 +7,11 @@ with nixlet; {
ports = [
{
name = "mqtt";
port = values.service.port;
inherit (values.service) port;
targetPort = 1883;
}
];
type = values.service.type;
inherit (values.service) type;
};
};
};

View file

@ -7,11 +7,11 @@ with nixlet; {
ports = [
{
name = "tcp";
port = values.service.port;
inherit (values.service) port;
targetPort = 5432;
}
];
type = values.service.type;
inherit (values.service) type;
};
};
};

View file

@ -1,8 +1,4 @@
{
nixlet,
lib,
...
}:
{nixlet, ...}:
with nixlet; {
kubernetes.resources = {
deployments."${values.uniqueName}" = {

View file

@ -8,10 +8,10 @@ with nixlet; {
{
name = "http";
targetPort = "http";
port = values.service.port;
inherit (values.service) port;
}
];
type = values.service.type;
inherit (values.service) type;
};
};
};

View file

@ -10,7 +10,7 @@ with nixlet; {
ports = [
{
name = "pd-server";
port = values.pd.service.port;
inherit (values.pd.service) port;
}
{
name = "peer";
@ -29,7 +29,7 @@ with nixlet; {
ports = [
{
name = "peer";
port = values.tikv.service.port;
inherit (values.tikv.service) port;
}
];
type = "ClusterIP";
@ -44,10 +44,10 @@ with nixlet; {
ports = [
{
name = "server";
port = values.pd.service.port;
inherit (values.pd.service) port;
}
];
type = values.pd.service.type;
inherit (values.pd.service) type;
};
};
};

View file

@ -1,4 +1,4 @@
{nixlet, ...}: {
{...}: {
imports = [
# import other files here
];