This commit is contained in:
mjallen18
2026-03-24 14:41:07 -05:00
parent 661c7c7771
commit 4cc58ab381

View File

@@ -0,0 +1,31 @@
{
config,
lib,
namespace,
...
}:
with lib;
let
name = "restic-server";
cfg = config.${namespace}.services.${name};
resticConfig = lib.${namespace}.mkModule {
inherit config name;
serviceName = "restic-rest-server";
description = "restic REST server";
options = { };
moduleConfig = {
services.restic.server = {
enable = true;
dataDir = "${cfg.dataDir}/backup/restic";
prometheus = true;
listenAddress = "${cfg.listenAddress}:${toString cfg.port}";
htpasswd-file = "${cfg.dataDir}/backup/restic/.htpasswd";
extraFlags = [ "--no-auth" ];
};
};
};
in
{
imports = [ resticConfig ];
}