mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-02-22 15:15:50 -06:00
don't use hydraJobs
This commit is contained in:
parent
0b33b32615
commit
2e7b6d59d6
4 changed files with 36 additions and 17 deletions
|
@ -90,21 +90,22 @@ let
|
|||
);
|
||||
formatter = forAllSystems (pkgs: (evalTreeFmt pkgs).config.build.wrapper);
|
||||
|
||||
hydraJobs = {
|
||||
systemPackages =
|
||||
(readDir ../hosts)
|
||||
|> mapAttrs (
|
||||
hostname: _:
|
||||
self.nixosConfigurations."${hostname}".config.environment.systemPackages
|
||||
|> map (drv: {
|
||||
name = drv.name;
|
||||
value = drv;
|
||||
})
|
||||
|> listToAttrs
|
||||
);
|
||||
|
||||
inherit (self) packages;
|
||||
};
|
||||
# use nixosConfigurations.$host.config.oizys.packages instead
|
||||
# hydraJobs = {
|
||||
# systemPackages =
|
||||
# (readDir ../hosts)
|
||||
# |> mapAttrs (
|
||||
# hostname: _:
|
||||
# self.nixosConfigurations."${hostname}".config.environment.systemPackages
|
||||
# |> map (drv: {
|
||||
# name = drv.name;
|
||||
# value = drv;
|
||||
# })
|
||||
# |> listToAttrs
|
||||
# );
|
||||
#
|
||||
# inherit (self) packages;
|
||||
# };
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
self,
|
||||
hostName,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
@ -13,6 +14,7 @@ let
|
|||
loadOverlays
|
||||
oizysSettings
|
||||
tryPkgsFromFile
|
||||
listToAttrs
|
||||
;
|
||||
in
|
||||
{
|
||||
|
@ -62,12 +64,25 @@ in
|
|||
};
|
||||
desktop.enable = mkEnableOption "is desktop";
|
||||
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 = {
|
||||
networking.hostName = hostName;
|
||||
time.timeZone = "US/Central";
|
||||
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; };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -48,6 +48,8 @@ hwylCli:
|
|||
j|jobs(countProcessors(),int, "jobs when pushing paths")
|
||||
n|`dry-run` "don't actually build derivations"
|
||||
run:
|
||||
if findExe("nix-eval-jobs") == "":
|
||||
fatalQuit bb"[b]oizys cache[/] requires [b]nix-eval-jobs[/]"
|
||||
nixBuildWithCache(name, args, service, jobs, `dry-run`)
|
||||
|
||||
[ci]
|
||||
|
|
|
@ -212,8 +212,9 @@ proc missingDrvNixEvalJobs*(): HashSet[NixEvalOutput] =
|
|||
var output: string
|
||||
|
||||
for host in getHosts():
|
||||
let flakeUrl = getFlake() & "#nixosConfigurations." & host & ".config.oizys.packages"
|
||||
let (o, _) = runCmdCaptWithSpinner(
|
||||
fmt"{cmd} {getFlake()}#hydraJobs.systemPackages.{host}",
|
||||
fmt"{cmd} {flakeUrl}",
|
||||
bb"running [b]nix-eval-jobs[/] for system path: " & host.bb("bold")
|
||||
)
|
||||
output.add o
|
||||
|
|
Loading…
Add table
Reference in a new issue