fix(nixfmt) Formatted modified files to default style

The style of files modified in this branch has been corrected.
This commit is contained in:
Skryta Istota 2025-12-02 15:15:15 +01:00
parent fc79dd5120
commit d8e55a05b2
No known key found for this signature in database
2 changed files with 121 additions and 107 deletions

View file

@ -11,13 +11,16 @@ in
pipelineName,
nixConfig,
}:
if ! nixConfig.enable then job else
if ! nixConfig.enable
then job
else
(builtins.removeAttrs job ["variables" "cache"])
// (prependToBeforeScript ["source setup_nix_ci \"gitlab-ci:pipeline:${pipelineName}:job-deps:${key}\""] job)
// (appendToAfterScript ["finalize_nix_ci"] job)
// (let
variables = job.variables or {} //
optionalAttrs nixConfig.enableRunnerCache {
variables =
job.variables or {}
// optionalAttrs nixConfig.enableRunnerCache {
NIX_CI_CACHE_STRATEGY = "runner";
};
in
@ -26,8 +29,9 @@ in
inherit variables;
})
// (let
cache = (toList (job.cache or [])) ++
(optional nixConfig.enableRunnerCache {
cache =
(toList (job.cache or []))
++ (optional nixConfig.enableRunnerCache {
key = nixConfig.runnerCacheKey;
paths = [".nix-cache/"];
});

View file

@ -91,10 +91,12 @@
BASH = toString pkgs.bash;
TEST = "work";
};
cache = [{
cache = [
{
name = "some";
paths = ["this"];
}];
}
];
};
actual = mkJobPatched {
key = "test";
@ -120,13 +122,16 @@
expected = {
after_script = ["finalize_nix_ci"];
before_script = ["source setup_nix_ci \"gitlab-ci:pipeline:test:job-deps:test\""];
cache = [{
cache = [
{
name = "some";
paths = ["this"];
}{
}
{
key = "test";
paths = [".nix-cache/"];
}];
}
];
variables = {
NIX_CI_CACHE_STRATEGY = "runner";
BASH = toString pkgs.bash;
@ -216,7 +221,8 @@
};
};
};
actual = (mkPipeline {
actual =
(mkPipeline {
name = "test";
nixConfig.enable = false;
pipeline = {
@ -255,13 +261,16 @@
before_script = ["source setup_nix_ci \"gitlab-ci:pipeline:test:job-deps:test\"" "./init"];
script = ["echo Hello World!"];
after_script = ["./clean" "finalize_nix_ci"];
cache = [{
cache = [
{
key = "simple";
paths = ["~/random/"];
}{
}
{
key = "random";
paths = [".nix-cache/"];
}];
}
];
variables = {
SAMPLE = "working";
HELLO = toString pkgs.hello;
@ -269,7 +278,8 @@
};
};
};
actual = (mkPipeline {
actual =
(mkPipeline {
name = "test";
nixConfig = {
enable = true;