feat: a bunch of things, also hcloud removal

This commit is contained in:
Kat Inskip 2024-10-25 12:55:56 -04:00
parent e59be4137b
commit 899e37094f
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
8 changed files with 40 additions and 32 deletions

View file

@ -26,6 +26,7 @@
channels = {
nixfiles.path = ../.;
std.path = "${channels.nixfiles.inputs.std}";
nixpkgs.path = "${channels.nixfiles.inputs.nixpkgs}";
};

View file

@ -1,9 +1,25 @@
{
lib,
config,
channels,
pkgs,
...
}:
with lib; {
with lib; let
inherit (channels.std) string list set;
enabledNixosSystems = filterAttrs (_: system: system.config.ci.enable && system.config.type == "NixOS") channels.nixfiles.systems;
exportsSystems = let
warnSystems = set.filter (_: system: system.ci.allowFailure) enabledNixosSystems;
toSystems = systems: string.concatMapSep " " string.escapeShellArg (set.keys systems);
in ''
NF_NIX_SYSTEMS=(${toSystems nixosSystems})
NF_NIX_SYSTEMS_WARN=(${toSystems warnSystems})
'';
buildAllSystems = pkgs.writeShellScriptBin "build-systems" ''
${exportsSystems}
nix run .#nf-actions-test";
'';
in {
imports = [./common.nix];
config = {
name = "flake-update";
@ -37,7 +53,7 @@ with lib; {
step.flake-update = {
name = "flake update build";
order = 500;
run = "nix run .#nf-update";
run = "${buildAllSystems}/bin/build-systems";
env = {
CACHIX_SIGNING_KEY = "\${{ secrets.CACHIX_SIGNING_KEY }}";
DISCORD_WEBHOOK_LINK = "\${{ secrets.DISCORD_WEBHOOK_LINK }}";

View file

@ -9,6 +9,7 @@ in {
alejandra
deadnix
statix
cachix
ssh-to-age
];
};