diff options
Diffstat (limited to 'configuration.nix')
-rw-r--r-- | configuration.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/configuration.nix b/configuration.nix index b3b7ada..937b1c8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -44,8 +44,9 @@ in { example = "redis://192.168.1.200:6379"; description = lib.mdDoc '' Set the backend used for storing data. Available backends are: - - `file://` - static folder backend (recommended) - - `redis://` - Redis backend (currently unavailable) + - `postgres://` - PostgreSQL backend (recommended) + - `file://` - static folder backend + - `redis://` - Redis backend (currently unavailable) Make sure that if you are using the file backend, the state directory is accessible by Kittybox. By default, the unit config @@ -114,6 +115,12 @@ in { }; }; config = lib.mkIf cfg.enable { + assertions = [ + { + assertion = lib.strings.hasPrefix cfg.backendUri "postgres://" -> cfg.package.hasPostgres; + message = "To use the Postgres backend, Kittybox has to be compiled with Postgres support enabled."; + } + ]; systemd.services.kittybox = { description = "An IndieWeb-enabled blog engine"; |