45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ config, lib, ... }:
|
|
let
|
|
cfg = config.services.az-grav;
|
|
volumePath = "/mnt/server-data/grav";
|
|
in
|
|
{
|
|
options = {
|
|
services.az-grav.enable = lib.mkEnableOption "Enable Grav.";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.az-docker.enable = true;
|
|
|
|
fileSystems."${volumePath}" = {
|
|
device = "10.7.89.108:server_data/grav";
|
|
fsType = "nfs";
|
|
options = [
|
|
"hard"
|
|
"noatime"
|
|
"rw"
|
|
];
|
|
};
|
|
virtualisation.oci-containers = {
|
|
backend = "docker";
|
|
containers."grav" = {
|
|
# https://fleet.linuxserver.io/image?name=linuxserver/grav
|
|
image = "lscr.io/linuxserver/grav:1.7.44@sha256:874195e16cd72f7e69e385ad0a4ce8a39bd58e4992479ebca58b0910990cc543";
|
|
autoStart = true;
|
|
environment = {
|
|
TZ = "Europe/Zurich";
|
|
PUID = "100";
|
|
PGID = "101";
|
|
};
|
|
ports = [ "8080:80" ];
|
|
volumes = [
|
|
"/etc/timezone:/etc/timezone:ro"
|
|
"/etc/localtime:/etc/localtime:ro"
|
|
"${volumePath}:/config"
|
|
];
|
|
extraOptions = [ "--log-opt=tag='grav'" ];
|
|
};
|
|
};
|
|
};
|
|
}
|