mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 23:29:08 +01:00
memos: Remove module
This commit is contained in:
parent
277dd188ae
commit
586a0907d4
1 changed files with 0 additions and 48 deletions
|
|
@ -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 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue