nixos/modules/services/heimdall/default.nix

44 lines
1.1 KiB
Nix
Raw Normal View History

2023-06-05 15:23:53 +02:00
{ config, lib, ... }:
let
cfg = config.services.az-heimdall;
2023-12-28 23:01:50 +01:00
volumePath = "/mnt/server-data/heimdall";
2024-02-02 13:45:05 +01:00
in
{
2023-06-05 15:23:53 +02:00
options = {
services.az-heimdall.enable = lib.mkEnableOption "Enable Heimdall";
};
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/heimdall";
fsType = "nfs";
2024-02-02 13:45:05 +01:00
options = [
"hard"
"noatime"
"rw"
];
2023-12-28 23:01:50 +01:00
};
2023-06-05 15:23:53 +02:00
virtualisation.oci-containers = {
backend = "docker";
containers."heimdall" = {
# https://fleet.linuxserver.io/image?name=linuxserver/heimdall
2024-03-25 11:02:27 +01:00
image = "linuxserver/heimdall:2.6.1@sha256:36517034b0b77f86d87aac06898639e90d1f8e1cc4350bd5928cd098eed7053c";
2023-06-05 15:23:53 +02:00
autoStart = true;
environment = {
TZ = "Europe/Zurich";
PUID = "1000";
PGID = "100";
};
2024-01-01 13:14:24 +01:00
ports = [ "8081:80" ];
2024-02-02 13:45:05 +01:00
volumes = [
"/etc/localtime:/etc/localtime:ro"
"${volumePath}:/config"
];
2024-01-01 13:14:24 +01:00
extraOptions = [ "--log-opt=tag='heimdall'" ];
2022-11-02 14:21:10 +01:00
};
};
};
}