mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-21 23:54:22 +01:00
Adapt website to new Nomad Nix patch
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
afcdff1b47
commit
2d92a13070
|
@ -17,7 +17,7 @@
|
|||
};
|
||||
init.services.apache2 = {
|
||||
ensureSomething.link."documentRoot" = {
|
||||
src = "${inputs.website.website."x86_64-linux".default}/redalder";
|
||||
src = "${inputs.website.website."x86_64-linux"}/redalder";
|
||||
dst = "/var/www";
|
||||
};
|
||||
shutdownOnExit = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, elib, vars, ... }:
|
||||
{ pkgs, elib, vars, config', ... }:
|
||||
let
|
||||
inherit (elib)
|
||||
nfsVolume
|
||||
|
@ -10,6 +10,9 @@ 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) {
|
||||
website = config'.flake.nixngConfigurations.website.config.system.build.toplevel;
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,6 +6,12 @@ variable "flake_sha" {
|
|||
type = string
|
||||
}
|
||||
|
||||
variable "store_path" {
|
||||
type = object({
|
||||
website = string
|
||||
})
|
||||
}
|
||||
|
||||
job "website" {
|
||||
datacenters = [ "homelab-1" ]
|
||||
type = "service"
|
||||
|
@ -61,6 +67,7 @@ job "website" {
|
|||
config {
|
||||
nix_flake_ref = "${var.flake_ref}#nixngConfigurations.website.config.system.build.toplevel"
|
||||
nix_flake_sha = var.flake_sha
|
||||
nix_flake_store_path = var.store_path.website
|
||||
entrypoint = [ "init" ]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue