fix: nodes?

This commit is contained in:
Kat Inskip 2024-07-13 16:43:26 -07:00
parent 9fcd2510a0
commit 09f06b3869
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
2 changed files with 93 additions and 90 deletions

View file

@ -1,14 +1,16 @@
{
lib,
config,
channels,
env,
config,
...
}:
with lib; {
with lib; let
pkgs = channels.nixpkgs;
in {
imports = [ ./common.nix ];
config = {
name = "nodes";
gh-actions = {
env = {
CACHIX_SIGNING_KEY = "\${{ secrets.CACHIX_SIGNING_KEY }}";
@ -17,11 +19,8 @@ with lib; {
on = let
paths = [
"*"
/*
"default.nix"
"ci/.nix"
"ci/nodes.nix"
config.ci.gh-actions.path
*/
];
in {
push = {
@ -32,28 +31,28 @@ with lib; {
};
workflow_dispatch = {};
};
jobs = let
genericNixosBuildJob = name: system: nameValuePair "${name}" {
step.${name} = {
name = "build system closure for ${name}";
order = 500;
run = "nix run .#nf-build-system -- nixosConfigurations.${name}.config.system.build.topLevel ${name} NixOS";
env = {
CACHIX_SIGNING_KEY = "\${{ secrets.CACHIX_SIGNING_KEY }}";
DISCORD_WEBHOOK_LINK = "\${{ secrets.DISCORD_WEBHOOK_LINK }}";
NF_UPDATE_GIT_COMMIT = "1";
NF_UPDATE_CACHIX_PUSH = "1";
NF_CONFIG_ROOT = "\${{ github.workspace }}";
};
};
};
enabledNixosSystems = filterAttrs (_: system: system.config.ci.enable) channels.nixfiles.systems;
nixosBuildJobs = mapAttrs' genericNixosBuildJob enabledNixosSystems;
in nixosBuildJobs;
};
jobs = let
enabledNixOSSystems = filterAttrs (_: system: system.config.ci.enable) channels.nixfiles.systems;
mkNixOSSystemJob = name: system: nameValuePair "${name}" {
step.${name} = {
name = "Build ${name} system closure";
order = 500;
run = "nix run .#nf-build-system -- nixosConfigurations.${name}.config.system.build.topLevel ${name} NixOS";
env = {
CACHIX_SIGNING_KEY = "\${{ secrets.CACHIX_SIGNING_KEY }}";
DISCORD_WEBHOOK_LINK = "\${{ secrets.DISCORD_WEBHOOK_LINK }}";
NF_UPDATE_GIT_COMMIT = "1";
NF_UPDATE_CACHIX_PUSH = "1";
NF_CONFIG_ROOT = "\${{ github.workspace }}";
};
};
};
nixOSSystemJobs = mapAttrs' mkNixOSSystemJob enabledNixOSSystems;
in nixOSSystemJobs;
};
jobs = {
packages = { ... }: {
flake-update = { ... }: {
imports = [ ./packages.nix ];
};
};