2023-06-05 15:14:06 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.services.az-grav;
|
2023-12-28 23:01:50 +01:00
|
|
|
volumePath = "/mnt/server-data/grav";
|
2023-06-05 15:14:06 +02:00
|
|
|
in
|
2022-11-03 21:49:32 +01:00
|
|
|
{
|
2023-06-05 15:14:06 +02:00
|
|
|
options = {
|
|
|
|
services.az-grav.enable = lib.mkEnableOption "Enable Grav.";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
services.az-docker.enable = true;
|
2023-05-29 17:10:15 +02:00
|
|
|
|
2023-12-28 23:01:50 +01:00
|
|
|
fileSystems."${volumePath}" = {
|
|
|
|
device = "10.7.89.108:server_data/grav";
|
|
|
|
fsType = "nfs";
|
|
|
|
options = [ "hard" "noatime" "rw" ];
|
|
|
|
};
|
2023-06-05 15:14:06 +02:00
|
|
|
virtualisation.oci-containers = {
|
|
|
|
backend = "docker";
|
|
|
|
containers."grav" = {
|
|
|
|
# https://fleet.linuxserver.io/image?name=linuxserver/grav
|
2023-12-28 13:08:19 +01:00
|
|
|
image = "lscr.io/linuxserver/grav:1.7.43@sha256:6cc4e340eda8c72f4671f9b9a4c1fad195deac59b9a88b6221f8b31d4fd64c08";
|
2023-06-05 15:14:06 +02:00
|
|
|
autoStart = true;
|
|
|
|
environment = {
|
|
|
|
TZ = "Europe/Zurich";
|
|
|
|
PUID = "100";
|
|
|
|
PGID = "101";
|
|
|
|
};
|
|
|
|
ports = [
|
|
|
|
"8080:80"
|
|
|
|
];
|
|
|
|
volumes = [
|
|
|
|
"/etc/timezone:/etc/timezone:ro"
|
|
|
|
"/etc/localtime:/etc/localtime:ro"
|
2023-12-28 23:01:50 +01:00
|
|
|
"${volumePath}:/config"
|
2023-06-05 15:14:06 +02:00
|
|
|
];
|
|
|
|
extraOptions = [
|
|
|
|
"--log-opt=tag='grav'"
|
|
|
|
];
|
2022-11-03 21:49:32 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|