diff --git a/modules/system/web-services/memos.nix b/modules/system/web-services/memos.nix deleted file mode 100644 index 9b5e407..0000000 --- a/modules/system/web-services/memos.nix +++ /dev/null @@ -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 ]; - }; - }; -}