don't use hydraJobs

This commit is contained in:
Daylin Morgan 2025-02-19 18:40:19 -06:00
parent 0b33b32615
commit 2e7b6d59d6
Signed by: daylin
GPG key ID: 950D13E9719334AD
4 changed files with 36 additions and 17 deletions

View file

@ -90,21 +90,22 @@ let
); );
formatter = forAllSystems (pkgs: (evalTreeFmt pkgs).config.build.wrapper); formatter = forAllSystems (pkgs: (evalTreeFmt pkgs).config.build.wrapper);
hydraJobs = { # use nixosConfigurations.$host.config.oizys.packages instead
systemPackages = # hydraJobs = {
(readDir ../hosts) # systemPackages =
|> mapAttrs ( # (readDir ../hosts)
hostname: _: # |> mapAttrs (
self.nixosConfigurations."${hostname}".config.environment.systemPackages # hostname: _:
|> map (drv: { # self.nixosConfigurations."${hostname}".config.environment.systemPackages
name = drv.name; # |> map (drv: {
value = drv; # name = drv.name;
}) # value = drv;
|> listToAttrs # })
); # |> listToAttrs
# );
inherit (self) packages; #
}; # inherit (self) packages;
# };
}; };
in in
{ {

View file

@ -4,6 +4,7 @@
self, self,
hostName, hostName,
pkgs, pkgs,
config,
... ...
}: }:
let let
@ -13,6 +14,7 @@ let
loadOverlays loadOverlays
oizysSettings oizysSettings
tryPkgsFromFile tryPkgsFromFile
listToAttrs
; ;
in in
{ {
@ -62,12 +64,25 @@ in
}; };
desktop.enable = mkEnableOption "is desktop"; desktop.enable = mkEnableOption "is desktop";
docker.enable = mkEnableOption "enable docker support"; docker.enable = mkEnableOption "enable docker support";
packages = mkOption {
type = lib.types.attrsOf lib.types.package;
description = "attr set of all packages, for use with nix-eval-jobs by `oizys cache`";
}; };
};
config = { config = {
networking.hostName = hostName; networking.hostName = hostName;
time.timeZone = "US/Central"; time.timeZone = "US/Central";
nixpkgs.overlays = import ../overlays { inherit inputs loadOverlays; }; nixpkgs.overlays = import ../overlays { inherit inputs loadOverlays; };
oizys = oizysSettings hostName; oizys = oizysSettings hostName // {
packages =
config.environment.systemPackages
|> map (drv: {
name = drv.name;
value = drv;
})
|> listToAttrs;
};
environment.systemPackages = tryPkgsFromFile { inherit hostName pkgs; }; environment.systemPackages = tryPkgsFromFile { inherit hostName pkgs; };
}; };
} }

View file

@ -48,6 +48,8 @@ hwylCli:
j|jobs(countProcessors(),int, "jobs when pushing paths") j|jobs(countProcessors(),int, "jobs when pushing paths")
n|`dry-run` "don't actually build derivations" n|`dry-run` "don't actually build derivations"
run: run:
if findExe("nix-eval-jobs") == "":
fatalQuit bb"[b]oizys cache[/] requires [b]nix-eval-jobs[/]"
nixBuildWithCache(name, args, service, jobs, `dry-run`) nixBuildWithCache(name, args, service, jobs, `dry-run`)
[ci] [ci]

View file

@ -212,8 +212,9 @@ proc missingDrvNixEvalJobs*(): HashSet[NixEvalOutput] =
var output: string var output: string
for host in getHosts(): for host in getHosts():
let flakeUrl = getFlake() & "#nixosConfigurations." & host & ".config.oizys.packages"
let (o, _) = runCmdCaptWithSpinner( let (o, _) = runCmdCaptWithSpinner(
fmt"{cmd} {getFlake()}#hydraJobs.systemPackages.{host}", fmt"{cmd} {flakeUrl}",
bb"running [b]nix-eval-jobs[/] for system path: " & host.bb("bold") bb"running [b]nix-eval-jobs[/] for system path: " & host.bb("bold")
) )
output.add o output.add o