memos: Remove module

This commit is contained in:
SebastianStork 2026-02-01 22:52:32 +01:00
parent 277dd188ae
commit 586a0907d4
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -1,48 +0,0 @@
{
config,
options,
lib,
...
}:
let
cfg = config.custom.web-services.memos;
dataDir = config.services.memos.settings.MEMOS_DATA;
in
{
options.custom.web-services.memos = {
enable = lib.mkEnableOption "";
domain = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "";
};
port = lib.mkOption {
type = lib.types.port;
default = 5230;
};
doBackups = lib.mkEnableOption "";
};
config = lib.mkIf cfg.enable {
services.memos = {
enable = true;
settings = options.services.memos.settings.default // {
MEMOS_PORT = toString cfg.port;
MEMOS_INSTANCE_URL = "https://${cfg.domain}";
};
};
custom = {
services = {
caddy.virtualHosts.${cfg.domain}.port = cfg.port;
restic.backups.memos = lib.mkIf cfg.doBackups {
conflictingService = "memos.service";
paths = [ dataDir ];
};
};
persistence.directories = [ dataDir ];
};
};
}