From df96f5581847f1c386773cef6b6c47bfe1f79cbf Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 31 May 2024 23:58:11 +0200 Subject: [PATCH] flake: update checks --- 2configs/deployment/buildbot/worker.nix | 3 ++- flake.nix | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/2configs/deployment/buildbot/worker.nix b/2configs/deployment/buildbot/worker.nix index d68558b..606331f 100644 --- a/2configs/deployment/buildbot/worker.nix +++ b/2configs/deployment/buildbot/worker.nix @@ -1,4 +1,4 @@ -{...}@inputs: +{config,inputs,...}: { imports = [ inputs.buildbot-nix.nixosModules.buildbot-worker @@ -7,6 +7,7 @@ services.buildbot-nix.worker = { enable = true; + name = "hotdog"; workerPasswordFile = config.sops.secrets.buildbot-github-nix-worker-password.path; }; } diff --git a/flake.nix b/flake.nix index c10385a..8d4d1e1 100644 --- a/flake.nix +++ b/flake.nix @@ -60,6 +60,11 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.clan-core.follows = "clan-core"; }; + + buildbot-nix.url = "github:Mic92/buildbot-nix"; + buildbot-nix.inputs.nixpkgs.follows = "nixpkgs"; + buildbot-nix.inputs.flake-parts.follows = "flake-parts"; + # buildbot-nix.inputs.treefmt-nix.follows = "treefmt-nix"; }; description = "Flake of makefu"; @@ -98,7 +103,7 @@ inherit (inputs) nixos-hardware self stockholm nixpkgs; inherit inputs; }; - machines = lib.genAttrs [ "filepimp" "mrdavid" "x" "cake" "tsp" "wbob" "omo" "gum" "savarcast" ] (host: rec { + machines = lib.genAttrs [ "filepimp" "x" "cake" "tsp" "wbob" "omo" "gum" "savarcast" ] (host: rec { # TODO inject the system somewhere else nixpkgs.hostPlatform = if host == "cake" then "aarch64-linux" else "x86_64-linux"; # nixpkgs.pkgs = if host == "cake" then pkgsForSystem "aarch64-linux" else pkgsForSystem "x86_64-linux"; @@ -131,12 +136,23 @@ vscode-server.nixosModules.default #self.nixosModules.krebs (./machines + "/${host}/config.nix") + + inputs.buildbot-nix.nixosModules.buildbot-master + inputs.buildbot-nix.nixosModules.buildbot-worker + ]; }); }; in { inherit (clan) nixosConfigurations clanInternals; + checks = let + a64 = "aarch64-linux"; + x86 = "x86_64-linux"; + in { + "${a64}" = lib.mapAttrs' (name: config: lib.nameValuePair "nixos-${a64}-${name}" config.config.system.build.toplevel) ((lib.filterAttrs (_: config: config.pkgs.system == a64)) self.nixosConfigurations); + "${x86}" = lib.mapAttrs' (name: config: lib.nameValuePair "nixos-${x86}-${name}" config.config.system.build.toplevel) ((lib.filterAttrs (_: config: config.pkgs.system == x86)) self.nixosConfigurations); + }; nixosModules = builtins.listToAttrs (map