mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-25 09:36:14 +01:00
Adapt Hydra to updated Nomad patch
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
58641c2cc4
commit
247abc7a1b
|
@ -1,4 +1,4 @@
|
|||
{ config, elib, vars, ... }:
|
||||
{ config, elib, vars, config', ... }:
|
||||
let
|
||||
inherit (elib)
|
||||
nfsVolume
|
||||
|
@ -44,6 +44,10 @@ in
|
|||
vars = {
|
||||
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
|
||||
flake_sha = vars.flake_sha;
|
||||
store_path = builtins.toJSON (builtins.mapAttrs (_: builtins.unsafeDiscardStringContext) {
|
||||
hydra = config'.flake.nixngConfigurations.hydra.config.system.build.toplevel;
|
||||
postgresql = config'.flake.nixngConfigurations.hydraPostgresql.config.system.build.toplevel;
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,6 +6,13 @@ variable "flake_sha" {
|
|||
type = string
|
||||
}
|
||||
|
||||
variable "store_path" {
|
||||
type = object({
|
||||
hydra = string
|
||||
postgresql = string
|
||||
})
|
||||
|
||||
|
||||
job "hydra" {
|
||||
datacenters = [ "homelab-1" ]
|
||||
type = "service"
|
||||
|
@ -90,6 +97,7 @@ job "hydra" {
|
|||
config {
|
||||
nix_flake_ref = "${var.flake_ref}#nixngConfigurations.hydra.config.system.build.toplevel"
|
||||
nix_flake_sha = var.flake_sha
|
||||
nix_flake_store_path = var.store_path.hydra
|
||||
entrypoint = [ "init" ]
|
||||
|
||||
devices = [
|
||||
|
@ -163,6 +171,7 @@ EOF
|
|||
config {
|
||||
nix_flake_ref = "${var.flake_ref}#nixngConfigurations.hydraPostgresql.config.system.build.toplevel"
|
||||
nix_flake_sha = var.flake_sha
|
||||
nix_flake_store_path = var.store_path.postgresql
|
||||
entrypoint = [ "init" ]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue