mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-22 08:04:20 +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
|
let
|
||||||
inherit (elib)
|
inherit (elib)
|
||||||
nfsVolume
|
nfsVolume
|
||||||
|
@ -44,6 +44,10 @@ in
|
||||||
vars = {
|
vars = {
|
||||||
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
|
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";
|
||||||
flake_sha = vars.flake_sha;
|
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
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "store_path" {
|
||||||
|
type = object({
|
||||||
|
hydra = string
|
||||||
|
postgresql = string
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
job "hydra" {
|
job "hydra" {
|
||||||
datacenters = [ "homelab-1" ]
|
datacenters = [ "homelab-1" ]
|
||||||
type = "service"
|
type = "service"
|
||||||
|
@ -90,6 +97,7 @@ job "hydra" {
|
||||||
config {
|
config {
|
||||||
nix_flake_ref = "${var.flake_ref}#nixngConfigurations.hydra.config.system.build.toplevel"
|
nix_flake_ref = "${var.flake_ref}#nixngConfigurations.hydra.config.system.build.toplevel"
|
||||||
nix_flake_sha = var.flake_sha
|
nix_flake_sha = var.flake_sha
|
||||||
|
nix_flake_store_path = var.store_path.hydra
|
||||||
entrypoint = [ "init" ]
|
entrypoint = [ "init" ]
|
||||||
|
|
||||||
devices = [
|
devices = [
|
||||||
|
@ -163,6 +171,7 @@ EOF
|
||||||
config {
|
config {
|
||||||
nix_flake_ref = "${var.flake_ref}#nixngConfigurations.hydraPostgresql.config.system.build.toplevel"
|
nix_flake_ref = "${var.flake_ref}#nixngConfigurations.hydraPostgresql.config.system.build.toplevel"
|
||||||
nix_flake_sha = var.flake_sha
|
nix_flake_sha = var.flake_sha
|
||||||
|
nix_flake_store_path = var.store_path.postgresql
|
||||||
entrypoint = [ "init" ]
|
entrypoint = [ "init" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue