nixos/modules/services/heimdall/default.nix

39 lines
1.0 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-01-01 13:14:24 +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";
options = [ "hard" "noatime" "rw" ];
};
2023-06-05 15:23:53 +02:00
virtualisation.oci-containers = {
backend = "docker";
containers."heimdall" = {
# https://fleet.linuxserver.io/image?name=linuxserver/heimdall
2024-01-01 13:14:24 +01:00
image =
"linuxserver/heimdall:2.5.8@sha256:2bf4feba39a64ceabb8e8aef1395c69513c8ab7dd122caa605c307d7ffcdad6f";
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" ];
volumes =
[ "/etc/localtime:/etc/localtime:ro" "${volumePath}:/config" ];
extraOptions = [ "--log-opt=tag='heimdall'" ];
2022-11-02 14:21:10 +01:00
};
};
};
}